Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > ASP Mailer Question

Reply
Thread Tools

ASP Mailer Question

 
 
John Davis
Guest
Posts: n/a
 
      08-17-2003
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




 
Reply With Quote
 
 
 
 
Evertjan.
Guest
Posts: n/a
 
      08-17-2003
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)
 
Reply With Quote
 
 
 
 
Curt_C [MVP]
Guest
Posts: n/a
 
      08-17-2003
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
>
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: [sendmail,perl] How to catch a mailer error [perl script as sendmail.cf mailer] Andrzej Adam Filip Perl 0 03-31-2008 09:24 PM
Mailer code sample available? Also - loop & delay question D. Shane Fowlkes ASP .Net 4 06-09-2005 02:28 PM
Mailer, Newsletter script in asp/asp.net =?Utf-8?B?Sm9l?= ASP .Net 1 02-23-2005 10:33 PM
Multiple field form for this ASP mailer script Mark Creelman ASP General 3 04-03-2004 05:01 AM
ASP dundas mailer question Raphael Gluck ASP General 6 08-11-2003 01:25 PM



Advertisments