Re: Mail Function In PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Any volume of mail sent direct to mx records is a red flag for anti spammers and without an smtp spf dkim and rdns you are wasting your time. The logic is that only people sending spam would be sending direct to mx like that. Fair or not that is just how life works. Oh and most mail servers do check rdns spf etc. 

It is kind of pointless to send emails if they end up in the spam folder or worse don't get delivered at all. Do it right the first time use an smtp rdns and spf at the very least. 


Sent via BlackBerry from T-Mobile

-----Original Message-----
From: Richard Quadling <rquadling@xxxxxxxxxxxxxx>
Date: Mon, 8 Mar 2010 10:21:53 
To: Kannan<kannan4k@xxxxxxxxx>
Cc: <php-general@xxxxxxxxxxxxx>
Subject: Re:  Mail Function In PHP
On 7 March 2010 04:54, Kannan <kannan4k@xxxxxxxxx> wrote:
> Hello
>           I am creating a application for our college using the
> php.In that i want to send mail to all who are all the list.
>
> For that i am just simply use the mail function in php without
> configuring any mail system in the system.But the mail didn't send.
> For sending the mails wat are requirements and if u have any tutorials
> send it to me?
>
> Thanks..
>
>
>
>
>
>
>
>
>
>
> --
> With regards,
>
> Kannan. R. P,
> Blog @: http://kannan4k.wordpress.com/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

Contrary to popular belief, to send an email you do not need to have
your own SMTP server. All you need to know is the SMTP server
responsible for your recipients email.

This information is held as part of the domain registration details
and is known as the MX records (as I understand it).

PHP has a function called getmxrr() [1]. This allows you to supply a
domain name and get back the list of MX records suitable for handling
the SMTP mail.

This function wasn't available on Windows until recently, and I
created a userland version utilising Windows nslookup.exe program [2].

So, once you've got the list of SMTP servers for the domain you are
sending email to, you can use the ini_set('SMTP', 'xxxxxx'); function
to set the server to handle the mail() call you are about to make.

Upside : No local SMTP server - you are not responsible for
maintaining/administering/etc. any aspect of the SMTP process.
Upside : If the mail() call fails, you can try the other MX records (I
tend to sort the results based upon weight and try them in sequence).
If it fails all of them, you know straight away and can deal with it.
Upside : No relaying. No permission issues to worry about. You are
simply talking to the public SMTP servers just like any other SMTP
server or sender.

Downside : No queuing. Without a_LOCAL_ SMTP server, you can only
deal with sending email in real time.
Downside : One domain at a time. You cannot send email to
a@xxxxxxxxxxx, b@xxxxxxxxxxxxxxxx c@xxxxxxxxxxx in the 1 email.

None of these steps affect the use of mail() or a mail sending class
(phpmailer, RMail, html_mime_mail5, etc.).

Regards,

Richard.

[1] http://docs.php.net/getmxrr
[2] http://docs.php.net/getmxrr#53182

Richard.

-- 
-----
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux