I've run into the same problem.
The only way around it that I know of (and it's not at all elegant) is to create a .ASP file on the fly, and to perform a javascript replace.
<script language="javascript">
location.replace("http://url_directory/mailer_application_created_a_moment_ago.asp");
</script>
<%
set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.RemoteHost = "emailservername"
Mailer.FromName = "from"
Mailer.FromAddress = "[EMAIL PROTECTED]"
Mailer.AddRecipient "Full Name", "[EMAIL PROTECTED]"
Mailer.Subject="subject line"
Mailer.BodyText = "body of message"
Mailer.ConfirmRead=true
Mailer.ContentType="text/html"
if not Mailer.SendMail then
Response.Write "Mailing Failed....Error is: <br>"
Response.write Mailer.Response
else
Response.write "Message Sent Successful...<br>Thanks"
end if
%>
Be sure to do some character replacements to the body of the message, too:
$message =~ s/</</g;
$message =~ s/>/>/g;
$message =~ s/"/"/g;
-----Original Message-----
From: Nick [mailto:[EMAIL PROTECTED]]
Sent: Sunday, February 25, 2001 10:29 AM
To: [EMAIL PROTECTED]
Subject: Sending Mail via Exchange server
Hi All
I am facing a bit of a problem!
I have sent emails from perl scripts in the past via SMTP servers,
this works fine using several different modules.
I have tried the same techniques on my system at work where via
Microsoft Exchange server (company standard), it only works
when the TO address is in the global address book, otherwise
the post is bounced by the server.
I am told that Microsoft Exchange does not adhere to the SMTP
protocol and that is why it doesn't work. Anyone know how to get
round this?
Nick
_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web
