Dirk Bremer wrote:
> $SMTP = Net::SMTP->new('mailservername');
> $Result = $SMTP->mail('mailrecipient);
> $Result = $SMTP->to('mailrecipient');
> $Result = $SMTP->data();
> $Result = $SMTP->datasend("To: Dirk Bremer\n");
> $Result = $SMTP->datasend("From: Perl\n");
> $Result = $SMTP->datasend("Subject: Email from Perl\n");
> $Result = $SMTP->datasend("\n");
> $Result = $SMTP->datasend("A simple test message\n");
> $Result = $SMTP->dataend();
> $Result = $SMTP->quit;
>
> Where "mailservername" and "mailrecipient" have valid values.
> The script
> does send the email, but when viewing the email in Outlook
> Express, the To
> field says name@unspecified-domain.
Perhaps that's because you haven't specified a domain in the To field. In
fact, you haven't specified an address at all. Keep in mind that the
recipient and the To: header are different.
$Result = $SMTP->datasend('To: Dirk Bremer <[EMAIL PROTECTED]>');
--
Mark Thomas [EMAIL PROTECTED]
Sr. Internet Architect User Technology Associates, Inc.
$_=q;KvtuyboopuifeyQQfeemyibdlfee;; y.e.s. ;y+B-x+A-w+s; ;y;y; ;;print;;
_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users