Page 1 of 1

Include user and password

Posted: Fri Feb 27, 2009 3:06 pm
by CanMikeF1
Got the nasty 'SMTP server response: 530 authentication required' when attempting to use the mail command in PHP. Works fine on my Unix box but obviously I need to send my username and password attached to my email server supplied my ISP.

So if my mail command is:

mail ('to-email-address', 'subject' ,'body of text' , 'from email address')'; where do I add my user/password?

My php.ini file is good, my SMTP = points of my server and smtp_port = 25.

Now, if I could only supply my user/password it would work.

Mike in Toronto

Re: Include user and password

Posted: Fri Feb 27, 2009 5:06 pm
by Randwulf
I don't think you can solve that problem with PHP. You'll need to solve it on the SMTP server by allowing PHP to send mail.

Re: Include user and password

Posted: Fri Feb 27, 2009 8:31 pm
by CanMikeF1
So how do you do that?

Re: Include user and password

Posted: Sat Feb 28, 2009 12:17 pm
by Randwulf
You'll need to talk to your host on that one. It depends on what sort of server they're running and what sort of security they have in place.

Re: Include user and password

Posted: Thu Mar 05, 2009 7:27 am
by CanMikeF1
Found a work-around. It's a small piece of software that creates a .bat file and then runs email through the command line, passing username and password.

It works, it's kludgy but it does the job. For testing code on my window (vista) OS, it's OK.

Thanks for the advice.