If you want to use gmail smtp server in PHP, php mailer is a good choice for you. Here is the example:
include(“class.phpmailer.php”);
$mail = new PHPMailer ();
$mail->IsSMTP ();
$mail->SMTPAuth = true;
$mail->SMTPSecure = “ssl”;
$mail->Host = “smtp.gmail.com”;
$mail->Port = 465;
$mail->Mailer= “smtp”;
$mail->Username = “username@gmail.com”;
$mail->Password >= “password”;
$mail->AddReplyTo (“Reply Email”, “Recipient Name”);
$mail->From = “sender@gmail.com”;
$mail->FromName = “Sender Name”;
$mail->Subject = “Email Subject”;
$mail->Body = “Email Content…”;
$mail->WordWrap = 50;
$mail->AddAddress (“receiver@gmail.com”, “Receiver Name”);
$mail->IsHTML (true);
$mail->Send ();
However, these simple codes could only work on PHP with enabling the ssl function. If not, you will probably find the warning message in the log file:
Warning: fsockopen() [function.fsockopen]: unable to connect to ssl://smtp.gmail.com:465 (Unable to find the socket transport “ssl” – did you forget to enable it when you configured PHP?)
To solve this problem, you have to make sure your php.ini including extension=php_openssl.dll (of course the file should be placed in php extension directory) and copy both libeay32.dll and ssleay32.dll from php directory to apache bin directory.
References:
Viagra Blood Pressure and Zolpidem From Canada and Diet Pill Adipex Cause Death and Viagra Faq and Acai Berry Perfect Food
Diet Pills No Prescription and Adderall Side Affects and Viagra Blood Pressure and Zolpidem From Canada and Diet Pill Adipex Cause Death
Clonazepam Effects and Purchase Butalbital With Mastercard and Buy Carisoprodol and Order Tramadol Online and Side Effects Of Taking Vicodin
Subaction Showcomments Viagra Thanks Online and Black Phentermine Capsule and Drug Valium and Tadalafil Cialis From India and Purchase Ativan From Canada
Buy Generic Augmentin and Phentermine Online Consultation and Abuse Phentermine and Cheaest Cialis Professional and Cymbalta Withdrawal
Advanced Acai Berry and What Does Alprazolam Look Like and Over The Counter Viagra and What Are Somas Used For and Acai Berry Data
Viagra Faq and Acai Berry Perfect Food and Buy Generic Augmentin and Phentermine Online Consultation and Abuse Phentermine
Quick Forum Readtopic Propecia Signature Content and Side Effects Of Adderall and Augmentin and Valium Dosage and Side Effects Of Cymbalta
Prevacid Ingredients and Tramadol Without A Prescription and Difference Between Adderall And Concerta and Acai Berry Properties Health Benefits and Online Xanax
Phentermine Capsule and Xanax Without A Prescription and Buy Alprazolam Overnight and Cozaar Tachycardia and Adderall No Prescription
Cheaest Cialis Professional and Cymbalta Withdrawal and Prevacid Ingredients and Tramadol Without A Prescription and Difference Between Adderall And Concerta
Tamiflu Order Without A Prescription and Side Effects Of Effexor and Ativan And Nyquil and How Does Viagra Work and Percocet Side Effects
Free Levitra and Buy Meridia Without Prescription and What Is Another Name For Lorazepam and Elavil Used For and Actos Side Effects
Viagra Uterine Thickness and No Prescription Xanax and Viagra Sample and Zoloft And Pregnancy and Effexor And Cymbalta
Buy Valium Online and How To Use Viagra and Take Amoxicillin Before Dentist Visit and How Do People Abuse Ultram and Cheap Tramadol Fedex Overnight
Acai Berry Properties Health Benefits and Online Xanax and Viagra Uterine Thickness and No Prescription Xanax and Viagra Sample
Xanax Timed Release and Pictures Of Xanax Pills and Purchase Percocet Online and Phentermine Diet Pill and Dangers Diet Pills