NYCPHP Meetup

NYPHP.org

[nycphp-talk] sending email from PHP

David Yun dyun at blue-iceberg.com
Thu Jun 3 16:37:47 EDT 2004


Corey,

Are you running mac osx? The reason why I ask is that there have been some
permissions issues with the default configuration of sendmail on os x,
specifically Jaguar.

If so, this article might help:
<http://www.macdevcenter.com/pub/a/mac/2002/02/26/terminal_three.html?page=3
&x-showcontent=off>

hope this helps

Dave



> 
> 
> 
> I¹m not a sendmail expert, and I¹d bet that something is screwy with either my
> sendmail configuration or with our local DNS setup. I also agree that my
> problem is outside of PHP.
> 
> For example when I try to do manually what PHP does with the mail() function:
> 
>   sendmail -v corey at domanistudios.com <out.txt
> 
> (the ­v tag makes it verbose, and <out.txt pipes in a basic text file as a
> body).
> 
> This takes just as long as mail(): about 30-45sec.
> 
> Mike DeWitt¹s trick doesn't seem to be working either, and I think it¹s
> because of this line:
> 
> putenv("PHP_SENDMAILPARAMS= -O DeliveryMode=defer -f $fromaddress");
> 
> Does anyone know if ³PHP_SENDMAILPARAMS² is something special that sendmail
> listens for? I¹m not familiar with how PHP, environment variables, and
> sendmail cooperate with each other. Can anyone explain this? Do I need to tell
> sendmail to look for this environment variable?
> 
> I¹m interested in how sites are able to send out millions of emails a day...
> there must be a simple way that I¹m overlooking.
> 
> 
> -corey
> 
> 
> 
> On 6/3/04 3:03 PM, "Eric Rank" <erank at isthmus.com> wrote:
> 
>> sending email from PHPHi Corey,
>> 
>> Sounds like an interesting problem. I've toyed with various mail sending
>> scripts including phpmailer (http://phpmailer.sourceforge.net) and
>> pear_mail_mime with pretty good luck in multiple configurations. In the
>> configurations I've used, the script calls out to sendmail (in my case Exim,
>> which is a nice drop-in alternative to sendmail) and places the mail in the
>> que of the mail server. The script runs as fast as it can make a request to
>> the mail server. That said, I think the problem is outside php. If you're
>> experiencing problems communicating with sendmail, you might try clearing
>> out the existing que first. It looks like Michael's suggestion is much more
>> in depth than what I'm telling you though. I bet he's right on the money.
>> 
>> I haven't dealt extensively with email address verification though. I've
>> toyed around with various ideas, but as far as I know, outside of making
>> requests to the MX of the domain directly, there's not an elegant way to
>> handle it. In doing so, you're actually writing a mail server. Quite a task.
>> As such, I've just had to deal with the replies to the sender's email from
>> the email recipient's MX telling me that the address doesn't exist, or that
>> the mailbox is full, or whatever.
>> 
>> I'd be interested in hearing other people's solutions for email
>> verification. It's such an important thing to do. There's gotta be an easy
>> way.
>> 
>> Good luck!
>> 
>> Eric
> 
> 
> DOMANI STUDIOS
> 
> Corey Szopinski
> Technology Director
>  
> corey at domanistudios.com
> 70 Washington St. Suite 710
> Brooklyn, NY 11201
> 718.797.4470  x116
> 
> 
> 
> _______________________________________________
> talk mailing list
> talk at lists.nyphp.org
> http://lists.nyphp.org/mailman/listinfo/talk
> 


David Yun
Production Manager


Blue Iceberg LLC
Interactive Strategy | Website Development | Business Solutions
http://www.blue-iceberg.com
Tel: 212.413.9226 Ext.9238  Fax: 212.413.9201




More information about the talk mailing list