469,635 Members | 1,899 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,635 developers. It's quick & easy.

ASP Mailer Question

What is the **MOST** obvious reason why will this will fail (it's not syntax
or anything specific to the object)?
Function Mail(MailerProgram, Message, Subject, Format, FromEmail, ToEmail,
ReplyTo, FromName, ToName, MailerPath, BCCEmail, Attachement)
Set Mailer = Server.CreateObject("Persits.MailSender")
if NOT isObject(Mailer) Then
Mail = false
Exit function
End if
Mailer.Host = MailerPath
Mailer.Port = 80
Mailer.From = FromEmail
Mailer.FromName = FromName
Mailer.AddReplyTo ReplyTo
Mailer.AddAddress ToEmail
Mailer.Subject = Subject
Mailer.Body = Message
If Format="HTML" Then
Mailer.IsHTML = True
Else
Mailer.IsHTML = False
End If
If IsArray(Attachement) Then
For Each AttFile In Attachement
if(AttFile <> "") Then Mailer.AddAttachment AttFile
Next
Else
If Attachement<>"" Then
Mailer.AddAttachment Attachement
End If
End If

On Error Resume Next
Mailer.Send


Jul 19 '05 #1
2 5065
John Davis wrote on 17 aug 2003 in microsoft.public.inetserver.asp.general:
If Format="HTML" Then
Mailer.IsHTML = True
Else
Mailer.IsHTML = False
End If


Bypassing yous specific question, the above is needlessly explicit and can
be shortened to:

Mailer.IsHTML = (Format="HTML")

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #2
remove the "On Error Resume Next" and you should get a nice error message

--
----------------------------------------------------------
Curt Christianson (Software_AT_Darkfalz.Com)
Owner/Lead Designer, DF-Software
http://www.Darkfalz.com
---------------------------------------------------------
...Offering free scripts & code snippits for everyone...
---------------------------------------------------------
"John Davis" <jr*******@hotmail.com> wrote in message
news:ex**************@TK2MSFTNGP09.phx.gbl...
What is the **MOST** obvious reason why will this will fail (it's not syntax or anything specific to the object)?
Function Mail(MailerProgram, Message, Subject, Format, FromEmail, ToEmail,
ReplyTo, FromName, ToName, MailerPath, BCCEmail, Attachement)
Set Mailer = Server.CreateObject("Persits.MailSender")
if NOT isObject(Mailer) Then
Mail = false
Exit function
End if
Mailer.Host = MailerPath
Mailer.Port = 80
Mailer.From = FromEmail
Mailer.FromName = FromName
Mailer.AddReplyTo ReplyTo
Mailer.AddAddress ToEmail
Mailer.Subject = Subject
Mailer.Body = Message
If Format="HTML" Then
Mailer.IsHTML = True
Else
Mailer.IsHTML = False
End If
If IsArray(Attachement) Then
For Each AttFile In Attachement
if(AttFile <> "") Then Mailer.AddAttachment AttFile
Next
Else
If Attachement<>"" Then
Mailer.AddAttachment Attachement
End If
End If

On Error Resume Next
Mailer.Send

Jul 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Raphael Gluck | last post: by
10 posts views Thread by Flopper | last post: by
1 post views Thread by Beyza | last post: by
4 posts views Thread by =?Utf-8?B?TWlrZSBI?= | last post: by
4 posts views Thread by Al G | last post: by
6 posts views Thread by Dave Kelly | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.