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

Swift Mailer is a fantastic library for sending email with php. Discuss this library or ask any questions about it here.

Moderators: Chris Corbyn, General Moderators

Post Reply
wennyq
Forum Newbie
Posts: 2
Joined: Sun Aug 19, 2007 12:08 pm

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

Post 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]
thewebdrivers
Forum Commoner
Posts: 41
Joined: Fri Aug 17, 2007 3:32 pm
Location: india
Contact:

Post by thewebdrivers »

looks like your smtp requires authentication before it can send email. have you setup legal username/password before sending email?
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post 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
wennyq
Forum Newbie
Posts: 2
Joined: Sun Aug 19, 2007 12:08 pm

Post by wennyq »

Thanks so much...i hav solve my problem after setting the username and password..thanks a lot
Post Reply