|
 |
asp_discuss thread: auto-email
Message #1 by "len sunga" <len_sunga@y...> on Fri, 14 Jun 2002 01:22:53
|
|
i would just like to ask, is there any way that i could automatically send
email notifications to newly registered members using ASP?
Message #2 by "Scott Reed" <scottr@m...> on Fri, 14 Jun 2002 12:22:58 -0500
|
|
Actually, there are several ways. What you choose depends on what the
server provides. The following is my emailFunctions.asp
<%
' 3 ways to send mail depending on Server. CDONTS is the most common.
Select case emailtype
case "ASPmail"
Set objNewMail = Server.CreateObject("SMTPsvg.Mailer")
objNewMail.FromName = EmailFromName
objNewMail.FromAddress = EmailFromAddress
' the mail server goes below
objNewMail.RemoteHost = MailServer
objNewMail.AddRecipient email, email
objNewMail.Subject = Subject
objNewMail.BodyText = Body
'on error resume next
SendOk = objNewMail.SendMail
If not(SendOk) <> 0 Then
Err_Msg = Err_Msg & "<li>Your request was not sent due to the following error: " & objNewMail.Response &
"</li>"
End if
case "cdonts"
Set objNewMail = Server.CreateObject ("CDONTS.NewMail")
objNewMail.BodyFormat = 1
objNewMail.MailFormat = 0
'on error resume next '## Ignore Errors
objNewMail.Send EmailFromAddress, email, Subject, Body
If Err <> 0 Then
Err_Msg = Err_Msg & "<li>Your request was not sent due to the following error: " & Err.Description &
"</li>"
End if
'on error resume next '## Ignore Errors
case "jmail"
set objNewMail = server.createobject("JMail.SMTPMail")
objNewMail.Sender = EmailFromAddress
objNewMail.ServerAddress = MailServer
objNewMail.AddRecipient email
objNewMail.Subject = Subject
objNewMail.Body = body
if objNewMail.Execute then
SendEmail = ""
else
' Message send failure
SendEmail = objMail.Response
end if
case "ASPEmail"
Set objNewMail = CreateObject("Persits.MailSender")
objNewMail.From = EmailFromAddress
objNewMail.Host = MailServer
objNewMail.AddAddress email
objNewMail.Subject = Subject
objNewMail.Body = body
'On Error Resume Next
objNewMail.Send
If Err <> 0 Then
SendEmail = "An error occurred: " & Err.Description
End If
end select
%>
-----Original Message-----
From: len sunga [mailto:len_sunga@y...]
Sent: Friday, June 14, 2002 1:23 AM
To: asp_discuss
Subject: [asp_discuss] auto-email
i would just like to ask, is there any way that i could automatically send
email notifications to newly registered members using ASP?
Message #3 by len sunga <len_sunga@y...> on Sat, 15 Jun 2002 06:23:02 -0700 (PDT)
|
|
--0-1746485601-1024147382=:5829
Content-Type: text/plain; charset=us-ascii
thanks for the reply. btw, how would i know which one is supported by the server being used? do i have to install the components?
Scott Reed <scottr@m...> wrote:
Actually, there are several ways. What you choose depends on what the
server provides. The following is my emailFunctions.asp
' 3 ways to send mail depending on Server. CDONTS is the most common.
Select case emailtype
case "ASPmail"
Set objNewMail = Server.CreateObject("SMTPsvg.Mailer")
objNewMail.FromName = EmailFromName
objNewMail.FromAddress = EmailFromAddress
' the mail server goes below
objNewMail.RemoteHost = MailServer
objNewMail.AddRecipient email, email
objNewMail.Subject = Subject
objNewMail.BodyText = Body
'on error resume next
SendOk = objNewMail.SendMail
If not(SendOk) 0 Then
Err_Msg = Err_Msg & "
Your request was not sent due to the following error: " & objNewMail.Response & ""
End if
case "cdonts"
Set objNewMail = Server.CreateObject ("CDONTS.NewMail")
objNewMail.BodyFormat = 1
objNewMail.MailFormat = 0
'on error resume next '## Ignore Errors
objNewMail.Send EmailFromAddress, email, Subject, Body
If Err 0 Then
Err_Msg = Err_Msg & "
Your request was not sent due to the following error: " & Err.Description & ""
End if
'on error resume next '## Ignore Errors
case "jmail"
set objNewMail = server.createobject("JMail.SMTPMail")
objNewMail.Sender = EmailFromAddress
objNewMail.ServerAddress = MailServer
objNewMail.AddRecipient email
objNewMail.Subject = Subject
objNewMail.Body = body
if objNewMail.Execute then
SendEmail = ""
else
' Message send failure
SendEmail = objMail.Response
end if
case "ASPEmail"
Set objNewMail = CreateObject("Persits.MailSender")
objNewMail.From = EmailFromAddress
objNewMail.Host = MailServer
objNewMail.AddAddress email
objNewMail.Subject = Subject
objNewMail.Body = body
'On Error Resume Next
objNewMail.Send
If Err 0 Then
SendEmail = "An error occurred: " & Err.Description
End If
end select
%>
-----Original Message-----
From: len sunga [mailto:len_sunga@y...]
Sent: Friday, June 14, 2002 1:23 AM
To: asp_discuss
Subject: [asp_discuss] auto-email
i would just like to ask, is there any way that i could automatically send
email notifications to newly registered members using ASP?
---------------------------------
Do You Yahoo!?
Sign-up for Video Highlights of 2002 FIFA World Cup
Message #4 by "Tim Morford" <tmorford@n...> on Sat, 15 Jun 2002 09:23:35 -0400
|
|
This is a multi-part message in MIME format.
------=_NextPart_000_0004_01C2144E.53479540
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: 7bit
Well if its a NT server, it should have CDONTS, but you can do trial and
error if you try the others and get "object not found" error then you know
that they do not have that object installed.
Tim Morford
http://www.speaking-of.net
http://www.aspalliance.com/tmorford
-----Original Message-----
From: len sunga [mailto:len_sunga@y...]
Sent: Saturday, June 15, 2002 9:23 AM
To: asp_discuss
Subject: [asp_discuss] RE: auto-email
thanks for the reply. btw, how would i know which one is supported by the
server being used? do i have to install the components?
Scott Reed <scottr@m...> wrote:
Actually, there are several ways. What you choose depends on what the
server provides. The following is my emailFunctions.asp
-----Original Message-----
From: len sunga [mailto:len_sunga@y...]
Sent: Friday, June 14, 2002 1:23 AM
To: asp_discuss
Subject: [asp_discuss] auto-email
i would just like to ask, is there any way that i could automatically
send
email notifications to newly registered members using ASP?
----------------------------------------------------------------------------
--
Do You Yahoo!?
Sign-up for Video Highlights of 2002 FIFA World Cup --- Change your mail
options at http://p2p.wrox.com/manager.asp or to unsubscribe send a blank
email to
Message #5 by "Scott Reed" <scottr@m...> on Mon, 17 Jun 2002 11:52:52 -0500
|
|
This is a multi-part message in MIME format.
------=_NextPart_000_0034_01C215F5.82BA3F50
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: 7bit
Check with the Server Administrator, I believe CDONTS is installed by
default on all
Windows NT and 2000 servers. Like Tim said, you can always try calling each
on and
check the response.
I can't remember where I got it but I hacked a small utility function out of
a Free ASP Forum
that checks the server and tells you what is available.
-----Original Message-----
From: Tim Morford [mailto:tmorford@n...]
Sent: Saturday, June 15, 2002 8:24 AM
To: asp_discuss
Subject: [asp_discuss] RE: auto-email
Well if its a NT server, it should have CDONTS, but you can do trial and
error if you try the others and get "object not found" error then you know
that they do not have that object installed.
Tim Morford
http://www.speaking-of.net
http://www.aspalliance.com/tmorford
-----Original Message-----
From: len sunga [mailto:len_sunga@y...]
Sent: Saturday, June 15, 2002 9:23 AM
To: asp_discuss
Subject: [asp_discuss] RE: auto-email
thanks for the reply. btw, how would i know which one is supported by
the server being used? do i have to install the components?
Scott Reed <scottr@m...> wrote:
Actually, there are several ways. What you choose depends on what the
server provides. The following is my emailFunctions.asp
-----Original Message-----
From: len sunga [mailto:len_sunga@y...]
Sent: Friday, June 14, 2002 1:23 AM
To: asp_discuss
Subject: [asp_discuss] auto-email
i would just like to ask, is there any way that i could automatically
send
email notifications to newly registered members using ASP?
----------------------------------------------------------------------------
Do You Yahoo!?
Sign-up for Video Highlights of 2002 FIFA World Cup --- Change your mail
options at http://p2p.wrox.com/manager.asp or to unsubscribe send a blank
email to
--- Change your mail options at http://p2p.wrox.com/manager.asp or to
unsubscribe send a blank email to
|
|
 |