Click here to Skip to main content
12,627,377 members (46,725 online)

Web Development

 
AnswerRe: PHP Pin
ramonwilson1-Oct-12 23:21
memberramonwilson1-Oct-12 23:21 
AnswerRe: PHP Pin
S.M. Zamshed Farhan12-Jan-13 16:33
memberS.M. Zamshed Farhan12-Jan-13 16:33 
QuestionCSS Placeholder question Pin
spankyleo12312-Sep-12 2:47
memberspankyleo12312-Sep-12 2:47 
AnswerRe: CSS Placeholder question Pin
mark merrens12-Sep-12 6:36
membermark merrens12-Sep-12 6:36 
Questionwhat is camera icon beside image search of google Pin
hosseinDolat11-Sep-12 22:44
memberhosseinDolat11-Sep-12 22:44 
AnswerRe: what is camera icon beside image search of google Pin
Sandeep Mewara11-Sep-12 23:18
mvpSandeep Mewara11-Sep-12 23:18 
GeneralRe: what is camera icon beside image search of google Pin
hosseinDolat12-Sep-12 1:25
memberhosseinDolat12-Sep-12 1:25 
GeneralRe: what is camera icon beside image search of google Pin
Sandeep Mewara12-Sep-12 1:35
mvpSandeep Mewara12-Sep-12 1:35 
AnswerRe: what is camera icon beside image search of google Pin
Mohibur Rashid12-Sep-12 0:42
memberMohibur Rashid12-Sep-12 0:42 
GeneralRe: what is camera icon beside image search of google Pin
hosseinDolat12-Sep-12 1:24
memberhosseinDolat12-Sep-12 1:24 
GeneralRe: what is camera icon beside image search of google Pin
Mohibur Rashid12-Sep-12 2:40
memberMohibur Rashid12-Sep-12 2:40 
AnswerRe: what is camera icon beside image search of google Pin
Shameel17-Sep-12 6:15
memberShameel17-Sep-12 6:15 
GeneralRe: what is camera icon beside image search of google Pin
hosseinDolat17-Sep-12 18:43
memberhosseinDolat17-Sep-12 18:43 
QuestionPHP Email Pin
chandra reinhart11-Sep-12 6:28
memberchandra reinhart11-Sep-12 6:28 
Hi all,

I've problem with send email using php. I used this code:

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 = "<myaccount@gmail.com>";
$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 Pin
Richard A. Abbott11-Sep-12 10:53
memberRichard A. Abbott11-Sep-12 10:53 
GeneralRe: PHP Email Pin
chandra reinhart11-Sep-12 14:29
memberchandra reinhart11-Sep-12 14:29 
GeneralRe: PHP Email Pin
Richard A. Abbott11-Sep-12 23:12
memberRichard A. Abbott11-Sep-12 23:12 
GeneralRe: PHP Email Pin
chandra reinhart11-Sep-12 23:47
memberchandra reinhart11-Sep-12 23:47 
GeneralRe: PHP Email Pin
Richard A. Abbott12-Sep-12 1:25
memberRichard A. Abbott12-Sep-12 1:25 
QuestionSearch action should be an HTTP GET or a POST? Pin
AlexCode11-Sep-12 1:23
memberAlexCode11-Sep-12 1:23 
AnswerRe: Search action should be an HTTP GET or a POST? Pin
Eddy Vluggen11-Sep-12 3:16
memberEddy Vluggen11-Sep-12 3:16 
GeneralRe: Search action should be an HTTP GET or a POST? Pin
AlexCode11-Sep-12 3:47
memberAlexCode11-Sep-12 3:47 
GeneralRe: Search action should be an HTTP GET or a POST? Pin
Eddy Vluggen11-Sep-12 6:32
memberEddy Vluggen11-Sep-12 6:32 
AnswerRe: Search action should be an HTTP GET or a POST? Pin
S.M. Zamshed Farhan12-Jan-13 16:35
memberS.M. Zamshed Farhan12-Jan-13 16:35 
QuestionHTML table oddity Pin
DavidCrow10-Sep-12 12:01
memberDavidCrow10-Sep-12 12:01 
AnswerRe: HTML table oddity Pin
Peter_in_278010-Sep-12 14:11
memberPeter_in_278010-Sep-12 14:11 
GeneralRe: HTML table oddity Pin
DavidCrow11-Sep-12 4:38
memberDavidCrow11-Sep-12 4:38 
AnswerRe: HTML table oddity Pin
AspDotNetDev10-Sep-12 14:15
protectorAspDotNetDev10-Sep-12 14:15 
GeneralRe: HTML table oddity Pin
DavidCrow11-Sep-12 4:44
memberDavidCrow11-Sep-12 4:44 
AnswerRe: HTML table oddity Pin
enhzflep10-Sep-12 16:17
memberenhzflep10-Sep-12 16:17 
QuestionJquery Ajax Pin
chandra reinhart9-Sep-12 19:24
memberchandra reinhart9-Sep-12 19:24 
SuggestionRe: Jquery Ajax Pin
Mohibur Rashid9-Sep-12 21:21
memberMohibur Rashid9-Sep-12 21:21 
GeneralRe: Jquery Ajax Pin
chandra reinhart11-Sep-12 5:30
memberchandra reinhart11-Sep-12 5:30 
QuestionIIS7 configuration error Pin
hariom_soni9-Sep-12 18:07
memberhariom_soni9-Sep-12 18:07 
QuestionWebsite hosting Pin
Sourav Sarkar-SS9-Sep-12 9:05
memberSourav Sarkar-SS9-Sep-12 9:05 
AnswerRe: Website hosting Pin
mark merrens10-Sep-12 7:20
membermark merrens10-Sep-12 7:20 
GeneralRe: Website hosting Pin
Sourav Sarkar-SS13-Sep-12 2:58
memberSourav Sarkar-SS13-Sep-12 2:58 
GeneralRe: Website hosting Pin
mark merrens13-Sep-12 6:05
membermark merrens13-Sep-12 6:05 
QuestionOpenFile dialog in a HTML page Pin
Madhan Mohan Reddy4-Sep-12 19:46
memberMadhan Mohan Reddy4-Sep-12 19:46 
AnswerRe: OpenFile dialog in a HTML page Pin
Sandeep Mewara4-Sep-12 20:07
mvpSandeep Mewara4-Sep-12 20:07 
GeneralRe: OpenFile dialog in a HTML page Pin
Madhan Mohan Reddy4-Sep-12 20:37
memberMadhan Mohan Reddy4-Sep-12 20:37 
GeneralRe: OpenFile dialog in a HTML page Pin
Killzone DeathMan21-Sep-12 2:05
memberKillzone DeathMan21-Sep-12 2:05 
GeneralRe: OpenFile dialog in a HTML page Pin
Madhan Mohan Reddy24-Sep-12 19:30
memberMadhan Mohan Reddy24-Sep-12 19:30 
GeneralRe: OpenFile dialog in a HTML page Pin
Killzone DeathMan26-Sep-12 1:52
memberKillzone DeathMan26-Sep-12 1:52 
GeneralRe: OpenFile dialog in a HTML page Pin
Madhan Mohan Reddy4-Sep-12 20:41
memberMadhan Mohan Reddy4-Sep-12 20:41 
GeneralRe: OpenFile dialog in a HTML page Pin
Sandeep Mewara4-Sep-12 21:18
mvpSandeep Mewara4-Sep-12 21:18 
GeneralRe: OpenFile dialog in a HTML page Pin
Madhan Mohan Reddy4-Sep-12 21:22
memberMadhan Mohan Reddy4-Sep-12 21:22 
GeneralRe: OpenFile dialog in a HTML page Pin
Sandeep Mewara4-Sep-12 21:24
mvpSandeep Mewara4-Sep-12 21:24 
QuestionHow to add a dynamic file(text) contents to a text area in the same form without submitting the form(using JSP) Pin
ethanlokesh4-Sep-12 11:45
memberethanlokesh4-Sep-12 11:45 
AnswerRe: How to add a dynamic file(text) contents to a text area in the same form without submitting the form(using JSP) Pin
Mohibur Rashid9-Sep-12 21:33
memberMohibur Rashid9-Sep-12 21:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    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
Web01 | 2.8.161205.3 | Last Updated 5 Dec 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid