Use PHP to verify user email

Source: Internet
Author: User
Use PHP to verify the user's email address in the PHP mailbox SMTP

1. the website requires a function to verify the email address of the registered user. use PHP (or use PHP to send an email without other functions ).




2. is there any need for SMTP or something? please help me.


Reply to discussion (solution)

You can use the phpmailer class, specifically Baidu!

Use phpmailer.
You need an email account. You can use phpmailer to send emails to your email account. This is the best way.
But there is a problem of elasticity, that is, it will be filtered out as spam. It is hard to say, that is why some websites do not use the email address of... for registration.
Therefore, if your website is not named, it may be that some websites will be filtered into the spam mailbox and even fail to receive it directly. In this case, it is best to use the accounts of individual sites, such as NetEase.

What server

What server

Windows 2008 32-bit

PHP + MySql

Personal host

2G memory

Dual-core CUP

Phpmailer

Http://download.csdn.net/detail/yang131261/5987941 lz can download this example to see

I can use phpmailer to test locally and send an email. However, it won't succeed after I put it on the php virtual host. I have asked csdn several times and it hasn't been solved. I couldn't send emails, so I had to store the customer's messages in the database.

There are two types of email verification: whether the mailbox format is true and whether the mailbox exists. First, use a regular expression. Second, you need an smtp server that can send emails.

1. the website requires a function to verify the email address of the registered user. use PHP (or use PHP to send an email without other functions ).




2. is there any need for SMTP or something? please help me.

The above experts used various technologies to verify the customer's email. could you change the logic? for example, Php automatically sends a verification link to the customer's email address when the customer registers, and the customer needs to click to complete the verification. When you click this link, a value is automatically transferred to your server for verification.

Could you give me some advice on the above ideas.


1. the website requires a function to verify the email address of the registered user. use PHP (or use PHP to send an email without other functions ).




2. is there any need for SMTP or something? please help me.

The above experts used various technologies to verify the customer's email. could you change the logic? for example, Php automatically sends a verification link to the customer's email address when the customer registers, and the customer needs to click to complete the verification. When you click this link, a value is automatically transferred to your server for verification.

Could you give me some advice on the above ideas.

Of course, many websites do not use the "activation" function to send emails. do you click "activate?
The server sends an activation address (which may contain a unique token, verification code, or sign) to the registered email address during user registration)
Similar to "cinema receipt ".

?? Is it the most common? Yes ?? Method:
1. in your own server? Set up smtp server? Then modify php. ini and use php? Set the mail letter ??? Parts
2. use phpmailer? Parts ??,??? Under? There is a demo later. let's take a look at the demo to know how to use it.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.