Welcome to Dream.In.Code
Getting PHP Help is Easy!

Join 136,050 PHP Programmers for FREE! Get instant access to thousands of PHP experts, tutorials, code snippets, and more! There are 1,565 people online right now. Registration is fast and FREE... Join Now!




mass mailing in php

 
Reply to this topicStart new topic

mass mailing in php, smtp error

snehalukey@gmail.com
21 Jul, 2008 - 12:16 AM
Post #1

New D.I.C Head
*

Joined: 18 Jul, 2008
Posts: 2

hello, i m sending bulk mail in php but it shows error that Failed to connect to mailserver at "www.xyz.com" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() ..

i have changed the SMTP="www.xyz.com" in php.ini but it shows the same error....

here is code ,

if (sendMail()) echo "mail sent";

function sendMail() {
$subject = "";
$message = "";
$toAddr = "";
$sql = "SELECT Email from recipients where groupname='myGroup'";
$result = mysql_query($sql);
while ($row = mysql_fetch_row($result)) {
$toAddr .= "$row[0];";
}
if (mail($toAddr,$subject,$message)) return true;
else return false;
}

.....

i hope i'll get some guidence to solve my problem..

thanking u...
Snehal
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/1/08 05:37PM

Live PHP Help!

PHP Tutorials

Reference Sheets

PHP Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month