1 | Download PHPMailer from http://phpmailer.sourceforge.net |
2 | Extract to folder phpmailer |
3 | Create a file email.php |
4 | Paste this code and change the values in blue as you need (I modified the sample code given on the PHPMailer homepage) IsSMTP(); // send via SMTP |
5 | Open the file class.smtp.php in phpmailer directory |
6 | Paste this code $host = "ssl://smtp.gmail.com"; $port = 465; before the line 104 #connect to the smtp server Hint: Search for #connect |
7 | Open this page in browser and it will send the email using GMail. |
Hint: When you want to email the details from a form, set the variables using the form variables. eg. $mail->Username=$_POST['email'] |
Senin, 25 Februari 2008
sending emails in php using PHPMailer and Gmail
[ This explains how to use gmail to send emails in php using PHPMailer]
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar