by luddite » 10. February 2013 13:27
I decided to first find what mail apps i have installed, use from the command line then assuming it worked ,invoke that app from
php.ini
bash-4.2# which mail
gives: /bin/mail
bash-4.2# which sendmail
gives: /usr/sbin/sendmail
I read up a bit,and got the hint that postfix might be easier, so installed that as well, its at
/usr/sbin/postfix
trying to send an email from the command line , I got a message in /var/spool/mail/andrew being :
----- The following addresses had permanent fatal errors -----
<myusername@gmail.com>
(reason: 550-5.7.1 [176.xxx.x.xx] The IP you're using to send mail is not authorized to)
----- Transcript of session follows -----
... while talking to gmail-smtp-in.l.google.com.:
>>> DATA
<<< 550-5.7.1 [176.xxx.x.xx]
The IP you're using to send mail is not authorized to
<<< 550-5.7.1 send email directly to our servers. Please use the SMTP relay at your
<<< 550-5.7.1 service provider instead. Learn more at
<<< 550 5.7.1 http://support.google.com/mail/bin/answer.py?answer=10336 r10si10195621wjx.198 - gsmtp
554 5.0.0 Service unavailable
So as far as I understand it, my Linux box sent an email directly to gmail, but gmail would prefer to go through my ISP ?
My ISP is sky.com and the smtp is : smtp.tools.sky.com so mu understanding is that if I want to send an email to myself
to my gmail email, from my box it has to go out via smtp.tools.sky.com.
I have seen some scripts that seem to define $smtpinfo, so am I right to leave
SMTP = localhost in the [mail function] of php.ini
//and
sendmail_path = usr/sbin/sendmail -t -l
and then specify smtp= smtp.tools.sky.com in my php mailer script?