|
Posted by eng.john84 on May 2, 2007, 12:00 pm
Please log in for more thread options
On Apr 20, 4:31 pm, yaz...@bulksms.com wrote:
> Hi
>
> > The below code contain two modules POP3Client & Sendmail .
> > The POP3Client used to get the subject from the header as numbers.
> > The Sendmail used to send message to ( 1234567...@bulksms.co.uk) .
> > The Problem how to print the subject from POP3Client to the email part
> > ( SUBJ...@bulksms.co.uk) at sendmail.
>
> [...]
>
> Try constructing a string containing each recipient separated by a
> comma (eg. 12345678...@bulksms.co.uk,10987654...@bulksms.co.uk,....),
> then use this string as the "To:" field.
>
> Example:
>
> my $numbers_string = "";
> for (my $i = 1; $i <= $pop->Count(); $i++) {
> foreach ( $pop->Head( $i ) ) {
> if (/^Subject:.+\s(\d+)/i) {
> $numbers_string += $1.",";
> }
> }
> print "\n";
>
> }
>
> my %mail = ( To => $numbers_string,
> From => 'xxxxxxxxxxx',
> Subject => 'xxxxxxxxxxx',
> Message => 'John',
> );
>
> Regards,
> Yazeed
Thanks for your help
But when i trys the code it ype NO RECEPTION! .
|