Page 1 of 1

[SOLVED] very strange problems

Posted: Wed Aug 22, 2007 8:02 am
by henrygao
I [s]m[/s] am supposed to send mail from support@mydomain.com to recipents@mail.com
but the code (as below) is not working

($swift->send($message, recipients@mail.com , "support@mydomain.com" ))

however, the below code is working well.
($swift->send($message, "support@mydomain.com" , recipients@mail.com ))

I really cant figure it out, any ideas? [s]Pls[/s] please help
Million thanks
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:11. Please use proper, complete spelling when posting in the forums. AOL Speak, leet speak and other abbreviated wording can confuse those that are trying to help you (or those that you are trying to help). Please keep in mind that there are many people from many countries that use our forums to read, post and learn. They do not always speak English as well as some of us, nor do they know these aberrant abbreviations. Therefore, use as few abbreviations as possible, especially when using such simple words.

Some examples of what not to do are ne1, any1 (anyone); u (you); ur (your or you're); 2 (to too); prolly (probably); afaik (as far as I know); etc.

Posted: Wed Aug 22, 2007 8:19 am
by Chris Corbyn
Not working?

Sounds like your SMTP server only allows incoming emails to be sent through it. Either you need to provide a username and password or you need to use a different server.

Posted: Wed Aug 22, 2007 8:22 am
by henrygao
d11wtq wrote:Not working?

Sounds like your SMTP server only allows incoming emails to be sent through it. Either you need to provide a username and password or you need to use a different server.
Actually the server is my owne server. after I config it, i can send/receive email for this domain email from both outlook and squirmail.
Does that mean the server configed properly?
I am really new in email domain. pls advise.
thanks alot

Posted: Wed Aug 22, 2007 8:27 am
by henrygao
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]


any, i m also trying put the authetic secion in the code as below

Code: Select all

$swift =& new Swift(new Swift_Connection_SMTP("mail.mydomain.com"));
echo "going to anth";
if ($swift->isConnected())
{
	echo "auth 1";
 if ($swift->authenticate('support@mydomain.com', 'password'))
 {
         $swift ->send('ttest@gmail.com', 'support@mydomain.com', 'hi', 'test mail');
         echo "auth success";
 }
 else echo "Didn't authenticate to server";
        $swift ->close();
}
else echo "The swift failed to connect.<br />";
the output is:
going to anth

i have no ideas why it stoped at that point?


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: Wed Aug 22, 2007 9:47 am
by Chris Corbyn
Where did you find that documentation? That old old code (and you're getting fatal errors, hence the halt).

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

Posted: Wed Aug 22, 2007 10:46 am
by henrygao
d11wtq wrote:Where did you find that documentation? That old old code (and you're getting fatal errors, hence the halt).

http://www.swiftmailer.org/wikidocs/v3/smtpauth
hi d11wtq:
finally i solved the problems. you are right, it is the auth issues!
so happy about it and million thanks for your kind help :)

Posted: Wed Aug 22, 2007 1:18 pm
by Chris Corbyn
Hi,

Glad to hear it :) Can I assume your PM was sent before you posted this thread?

Cheers,

Chris