Page 1 of 1

[SOLVED] Fail in sending email..Please help!

Posted: Sun Aug 19, 2007 12:20 pm
by wennyq
feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


i tried the basic email sending with the coding below

Code: Select all

<?php
 
//Load in the files we'll need
require_once "lib/Swift.php";
require_once "lib/Swift/Connection/SMTP.php";
 
//Start Swift
$swift =& new Swift(new Swift_Connection_SMTP("smtp.tm.net.my"));
 
//Create the message
$message =& new Swift_Message("My subject", "My body");
 
//Now check if Swift actually sends it
if ($swift->send($message, "xxx@yahoo.com", "xxx@yahoo.com")) echo 

"$message Sent";
else echo "Failed";
?>

i tried on 2 pc s...

first pc:
window vista installed, McAfree antivirus software
and i get the error message from McAfree
Warning: mail(): SMTP server response: 550 5.7.1 Authentication required Refer guideline http://webmail.tm.net.my/smtpauth.html: xx@tm.net.my in c:\program files\easyphp1-7\www\e-chinese\thank.php on line 45

second pc:
window xp, norton antivirus
but the result return "fail" when i m trying to send the email.

Can anyone help me solve my problems? It's urgent :(


feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Posted: Sun Aug 19, 2007 3:22 pm
by thewebdrivers
looks like your smtp requires authentication before it can send email. have you setup legal username/password before sending email?

Posted: Sun Aug 19, 2007 4:08 pm
by Chris Corbyn
Sorry I meant to reply to this earlier but got distracted when my Indian Takeout got delivered :P Indeed, your server requires a username and password.

http://www.swiftmailer.org/wikidocs/v3/smtpauth

Posted: Sun Aug 19, 2007 11:17 pm
by wennyq
Thanks so much...i hav solve my problem after setting the username and password..thanks a lot