用PHP验证用户邮箱
PHP 邮箱 邮件 SMTP
1.网站需要一个验证注册用户邮箱的功能用PHP( 或者说怎么用PHP发一个邮件,不需要其他功能)。2.是不是还需要什么SMTP什么的,求大家帮个忙。
回复讨论(解决方案)
可以使用phpmailer这个类,具体百度!
使用phpmailer。
你需要一个邮箱账户。使用phpmailer来操作邮箱账户发邮件。这是最好的办法。
但是有个有弹性的问题,那就是会被当做垃圾邮件过滤掉。程度很难说,这就是为什么有些网站提示请不要使用...的邮箱注册。
所以如果自己的站点不出名不重要,有可能个别的网站会过滤到垃圾邮箱里面甚至直接没有收到。这样的话最好用个别的站点的账户,例如网易等。
先说啥服务器
先说啥服务器
windows 2008 32位
PHP+MySql
个人主机
2.5G内存
双核CUP
phpmailer
http://download.csdn.net/detail/yang131261/5987941 lz可以下载这个例子看看
我用phpmailer在本地测试可以发邮件,但是放到php虚拟主机后就不能成功,在csdn问了好几次也没有解决。搞得我没法发邮件,只好把客户留言存在数据库里。
验证邮箱分两种:一种是邮箱格式是否真实,另一种邮箱是否存在。 第一种使用正则表达式就可以了。第二种你需要有个可以发送邮件smtp服务器
1.网站需要一个验证注册用户邮箱的功能用PHP( 或者说怎么用PHP发一个邮件,不需要其他功能)。
2.是不是还需要什么SMTP什么的,求大家帮个忙。
前面大神们都是通过各种技术在客户收到邮件前来验证,能不能换个思路:比如,客户注册时Php自动向客户邮箱发出验证链接,需要客户点击完成验证。而客户点击该链接时,自动向你服务器传递一个值,来进行验证。
上述思路可否,请大神们指点。
1.网站需要一个验证注册用户邮箱的功能用PHP( 或者说怎么用PHP发一个邮件,不需要其他功能)。
2.是不是还需要什么SMTP什么的,求大家帮个忙。
前面大神们都是通过各种技术在客户收到邮件前来验证,能不能换个思路:比如,客户注册时Php自动向客户邮箱发出验证链接,需要客户点击完成验证。而客户点击该链接时,自动向你服务器传递一个值,来进行验证。
上述思路可否,请大神们指点。
当然可以,很多网站的“激活”功能不就是发送邮件,点击激活的么?
服务端在用户注册时向注册邮箱发送激活地址(其中可能包含唯一的一个token或者验证码或者标志)
类似于“电影院的凭票入内”。
??件最常?有??方式:
1.在自己的服?器上搭建smtp服?器,然後修改php.ini,最後用php?置的mail函???件
2.使用phpmailer?件??,???件下?之後有demo,看一下demo就知道如何用了

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



The PHP Client URL (cURL) extension is a powerful tool for developers, enabling seamless interaction with remote servers and REST APIs. By leveraging libcurl, a well-respected multi-protocol file transfer library, PHP cURL facilitates efficient execution of various network protocols, including HTTP, HTTPS, and FTP. This extension offers granular control over HTTP requests, supports multiple concurrent operations, and provides built-in security features.

Alipay PHP...

Do you want to provide real-time, instant solutions to your customers' most pressing problems? Live chat lets you have real-time conversations with customers and resolve their problems instantly. It allows you to provide faster service to your custom

Article discusses late static binding (LSB) in PHP, introduced in PHP 5.3, allowing runtime resolution of static method calls for more flexible inheritance.Main issue: LSB vs. traditional polymorphism; LSB's practical applications and potential perfo

JWT is an open standard based on JSON, used to securely transmit information between parties, mainly for identity authentication and information exchange. 1. JWT consists of three parts: Header, Payload and Signature. 2. The working principle of JWT includes three steps: generating JWT, verifying JWT and parsing Payload. 3. When using JWT for authentication in PHP, JWT can be generated and verified, and user role and permission information can be included in advanced usage. 4. Common errors include signature verification failure, token expiration, and payload oversized. Debugging skills include using debugging tools and logging. 5. Performance optimization and best practices include using appropriate signature algorithms, setting validity periods reasonably,

Article discusses essential security features in frameworks to protect against vulnerabilities, including input validation, authentication, and regular updates.

The article discusses adding custom functionality to frameworks, focusing on understanding architecture, identifying extension points, and best practices for integration and debugging.

Sending JSON data using PHP's cURL library In PHP development, it is often necessary to interact with external APIs. One of the common ways is to use cURL library to send POST�...
