473,386 Members | 1,799 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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 5295
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Raphael Gluck | last post by:
Hi all I am still finding my feet creating a website in ASP, and i'm trying to get to grips with users providing feeback to my site. my webhosts have the dundas mailer installed, and i am trying...
8
by: Dave Smithz | last post by:
Hi, Thanks to this group I discovered the excellent PHP Mailer (http://phpmailer.sourceforge.net/) which I use to send emails. Part of my application emails out hundreds of club members unique...
10
by: Flopper | last post by:
Hey can anyone help me with a WORKING anonymous mailer php script. I've looked on the net but only find non working one's. Greetings Floppie
1
by: Beyza | last post by:
Hi, I have a problem. One of my customer used to use php mailer in her web page. But when i changed something in the system (php packages) , it was broken. If she use php-mailer in her system,...
4
by: =?Utf-8?B?TWlrZSBI?= | last post by:
I'm using a block of ASP to allow a user to send a form via e-mail. However, someone keeps sending me spam through this form and they're using a bogus return address. I'm testing for a successful...
4
by: Al G | last post by:
Has anyone played with MS's SMTP sample, mailer.exe? I downloaded the sample, and ran it, but keep getting the error "Failure sending mail". Where might I look for more information? Maybe some...
1
by: Ron | last post by:
Hi All, I've got a requirement to print an existing statement printing report to another printer that's set up to print on a wide-carriage, bottom-fed dot-matrix printer. That printer's sole...
6
by: Dave Kelly | last post by:
Sorry for the long post, it is easier to discard information than to have to wait for it to arrive. So here goes: This code worked perfectly when I was an Earthlink customer. Sprint decided...
9
by: neovantage | last post by:
hey geeks, I have a small mail script which will cause a PHP script to send a receipt upon clicking the submit button, by an HTML mail. This mail contains special characters, namely 'å', 'ä' and...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.