You are here: Re: Getting multiple emails from a single mail()... « PHP Programming Language « IT news, forums, messages
Re: Getting multiple emails from a single mail()...

Posted by Jerry Stuckle on 08/02/07 04:01

Rik wrote:
> On Thu, 02 Aug 2007 05:18:54 +0200, Jerry Stuckle
> <jstucklex@attglobal.net> wrote:
>
>> crazycooter@gmail.com wrote:
>>> I followed through the steps (pretty cool hehe) and I got a single
>>> email as a result.
>>> CrazyCooter
>>>
>>
>> It really looks like you're calling mail() five times. Try sometning
>> like this:
>>
>> function send_email($email_from, $email_to, $subject, $msg,
>> $show_result = null)
>> {
>> static count = 1;
> $count
>
>> ...
>> $headers = "From: $from \r\n";
>> $headers .= "Reply-To: $from \r\n";
>> ...
>> $messagebody = "Count: " . $count++ . "\n\n" . $messagebody;
>> $result = mail($sendto, $subject, $messagebody, $headers);
>> ...
>> }
>>
>> This will give an incrementing count at the start of the message body,
>> starting at 1.
>
> Indeed. Possibly use debug_backtrace() to check where it happens, but
> most likely it's an undesired loop and linenumbers will be the same.
> --Rik Wasmus

Thanks, Rik. I should know not to try to post code at midnight... :-)

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация