It's not a question of whether you can send mail to Imail from ASP or not.
It's more a question of if it's possible to send mail to *any* smtp server
from ASP.
Here is the code I programmed in ASP and JavaScript for it to work. All you
have to do is download Dimac's Jmail component from their site which is
free.
Replace mail.mailserver1.com and mail.mailserver2.com with your mail servers
names, if you only have one, remove the last one. It's always good to set
the second one to your ISPs mail server, just in case.
You can have multiple recipients separated by commas. The second to the last
recipients will be treated as BCC recipients. Anyway feel free to change the
code.
<script runat=server language=JavaScript>
function sendmail(recipient, subject, body, sender, sendername, type)
{
JMail=Server.CreateObject("JMail.SMTPMail");
JMail.ServerAddress = 'mail.mailserver1.com; mail.mailserver2.com';
JMail.Charset = 'iso-8859-1';
if (type) JMail.ContentType=type;
recipient=recipient.split(',');
JMail.AddRecipient(recipient[0]);
for (x=1; x<recipient.length; x++)
JMail.AddRecipientBCC(recipient[x]);
JMail.Subject = subject;
JMail.Sender = recipient[0];
JMail.SenderName = sendername;
JMail.ReplyTo = sender;
JMail.Body = body;
return JMail.Execute();
}
</script>
Bruno Carlos <flesk lda>
site: www.flesk.com
Please visit http://www.ipswitch.com/support/mailing-lists.html
to be removed from this list.
An Archive of this list is available at:
http://www.mail-archive.com/imail_forum%40list.ipswitch.com/