[SOLVED] very strange problems

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
henrygao
Forum Newbie
Posts: 9
Joined: Tue Aug 21, 2007 2:15 am

[SOLVED] very strange problems

Post 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.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post 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.
henrygao
Forum Newbie
Posts: 9
Joined: Tue Aug 21, 2007 2:15 am

Post 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
henrygao
Forum Newbie
Posts: 9
Joined: Tue Aug 21, 2007 2:15 am

Post 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]
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post 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
henrygao
Forum Newbie
Posts: 9
Joined: Tue Aug 21, 2007 2:15 am

Post 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 :)
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Hi,

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

Cheers,

Chris
Post Reply