windows - can't send mail in php using external smtp server -
i'm trying send mail out external smtp server using php script below,
<?php $recipient="john_doe@gmail.com"; $subject="website customer"; $message="customer name: ".$_post['name']."\r\n"; $message.="customer email: ".$_post['email']."\r\n"; $message.="customer message: ".$_post['msg']."\r\n"; $mailheader="from: <maria@comcast.net> \r\n"; $mailheader.="reply ".$_post['email']; ini_set("smtp","comcast.net"); mail($recipient, $subject, $message, $mailheader); ?> <!doctype html> <html> <head> <title>sending mail website customer</title> </head> <body> <p>thanks, <strong><?php echo $_post['name']; ?></strong>, message.</p> <p>your email address: <strong><?php echo $_post['email']; ?></strong></p> <p>your message: <br/><?php echo $_post['msg']; ?></p> </body> <html>
i got error message:
warning: mail() [function.mail]: failed connect mailserver @ "comcast.net" port 25, verify "smtp" , "smtp_port" setting in php.ini or use ini_set() in c:\program files (x86)\apache software foundation\apache2.2\htdocs\sendmail.php on line 10
is because don't have local email server? phpmailer solve problem? can guide me right direction please? lot.
yeah. 5 seconds on google found this, http://customer.comcast.com/help-and-support/internet/list-of-blocked-ports/
use port 465. may need setup account information send outgoing on servers too.
Comments
Post a Comment