Click here to Skip to main content
       

Web Development

 
GeneralRe: what is camera icon beside image search of google PinmemberhosseinDolat12-Sep-12 0:25 
GeneralRe: what is camera icon beside image search of google PinmvpSandeep Mewara12-Sep-12 0:35 
AnswerRe: what is camera icon beside image search of google PinmemberMohibur Rashid11-Sep-12 23:42 
GeneralRe: what is camera icon beside image search of google PinmemberhosseinDolat12-Sep-12 0:24 
GeneralRe: what is camera icon beside image search of google PinmemberMohibur Rashid12-Sep-12 1:40 
AnswerRe: what is camera icon beside image search of google PinmemberShameel17-Sep-12 5:15 
GeneralRe: what is camera icon beside image search of google PinmemberhosseinDolat17-Sep-12 17:43 
QuestionPHP Email Pinmemberchandra reinhart11-Sep-12 5:28 
Hi all,
 
I've problem with send email using php. I used this code:
 
require_once 'phpmailer/class.phpmailer.php';
$mail = new PHPMailer();
$mail->IsSMTP();
 
//GMAIL config
$mail->SMTPAuth = true; // enable SMTP authentication
$mail->SMTPSecure = "ssl"; // sets the prefix to the server
$mail->Host = "smtp.gmail.com"; // sets GMAIL as the SMTP server
$mail->Port = 465; // set the SMTP port for the GMAIL server
$mail->Username = "myaccount@gmail.com"; // GMAIL username
$mail->Password = "mypassword"; // GMAIL password
//End Gmail
 
$mail->From = "";
$mail->FromName = "I am";
$mail->Subject = "Test";
$mail->MsgHTML("the message");
 
//$mail->AddReplyTo("reply@email.com","reply name");//they answer here, optional
$mail->AddAddress("myfriend@gmail.com","Myfriend");
$mail->IsHTML(true); // send as HTML
 
if(!$mail->Send()) {//to see if we return a message or a value bolean
echo "Mailer Error: " . $mail->ErrorInfo;
} else echo "Message sent!";
 
?>
 
After I running the code and I get this error :
 
SMTP Error: Could not connect to SMTP host. Mailer Error: SMTP Error: Could not connect to SMTP host.
 
Why this code isn't running properly? What should I do?
 
Thank you,
 
Reinhart
AnswerRe: PHP Email PinmemberRichard A. Abbott11-Sep-12 9:53 
GeneralRe: PHP Email Pinmemberchandra reinhart11-Sep-12 13:29 
GeneralRe: PHP Email PinmemberRichard A. Abbott11-Sep-12 22:12 
GeneralRe: PHP Email Pinmemberchandra reinhart11-Sep-12 22:47 
GeneralRe: PHP Email PinmemberRichard A. Abbott12-Sep-12 0:25 
QuestionSearch action should be an HTTP GET or a POST? PinmemberAlexCode11-Sep-12 0:23 
AnswerRe: Search action should be an HTTP GET or a POST? PinmemberEddy Vluggen11-Sep-12 2:16 
GeneralRe: Search action should be an HTTP GET or a POST? PinmemberAlexCode11-Sep-12 2:47 
GeneralRe: Search action should be an HTTP GET or a POST? PinmemberEddy Vluggen11-Sep-12 5:32 
AnswerRe: Search action should be an HTTP GET or a POST? PinmemberS.M. Zamshed Farhan12-Jan-13 15:35 
QuestionHTML table oddity PinmemberDavidCrow10-Sep-12 11:01 
AnswerRe: HTML table oddity PinmemberPeter_in_278010-Sep-12 13:11 
GeneralRe: HTML table oddity PinmemberDavidCrow11-Sep-12 3:38 
AnswerRe: HTML table oddity PinprotectorAspDotNetDev10-Sep-12 13:15 
GeneralRe: HTML table oddity PinmemberDavidCrow11-Sep-12 3:44 
AnswerRe: HTML table oddity Pinmemberenhzflep10-Sep-12 15:17 
QuestionJquery Ajax Pinmemberchandra reinhart9-Sep-12 18:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web04 | 2.8.140709.1 | Last Updated 10 Jul 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid