Hi all,

is there a way to find a users SMTP-Address for the "From" field? I don't want to 
hardcode the user's smtp-address in my script and i want to send any mail as the 
current user (see $from in the example below). Is there a way to do that without 
Net::LDAP?

My snippet of code goes like that:

use Win32::OLE;

my $from = ???
my $mailto = "somebody\@somedomain.org";

my $mail = Win32::OLE->new("CDONTS.Newmail") or die "$? : $!";
$mail->{To} = $mailto;
$mail->{From} = $from;
$mail->{Subject} = "Test...";
$mail->Send() or die "$? : $!;

Any help appreciated.

Michael Bonetsmuller.

_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to