473,396 Members | 1,827 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,396 software developers and data experts.

how to send email from an asp page ?

how to send email from an asp page ?

--
Sivaswami Jeganathan
Mar 24 '06 #1
2 1991

"Sivaswami Jeganathan" <j_*********@hotmail.com> wrote in message
news:u7**************@TK2MSFTNGP12.phx.gbl...
how to send email from an asp page ?

--
Sivaswami Jeganathan


try this, exchange server example below, remote server below that
' via stmp
Sub sendEmail(whoTo, subject, body)
Dim iMsg
Dim iConf
Dim Flds
Const cdoSendUsingPickup = 1
Const strPickup = "c:\Inetpub\mailroot\pickup"
Set iMsg = CreateObject("CDO.Message")
Set iConf = iMsg.Configuration
With iConf.Fields
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") =
cdoSendUsingPickup
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory")
= strPickup
.Update
End With
With iMsg
.To = whoTo
.From = "We*******@mawa.org.au"
.subject = subject
.HTMLBody = body
.Send
End With
End Sub

'via exchange pickup
Sub sendEmail(whoTo, subject, body)
Dim iMsg
Dim iConf
Dim Flds
Const cdoSendUsingPickup = 1
Const strPickup = "c:\Program Files\Exchsrvr\Mailroot\vsi 1\PickUp"
Set iMsg = CreateObject("CDO.Message")
Set iConf = iMsg.Configuration
With iConf.Fields
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") =
cdoSendUsingPickup
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory")
= strPickup
.Update
End With
With iMsg
.To = whoTo
.From = "We*******@mawa.org.au"
.subject = subject
.HTMLBody = body
.Send
End With
End Sub

'via remote server
Sub sendEmail(whoTo, subject, body)
Dim iMsg
Dim iConf
Dim Flds
Const mailServer = "yourmailserver.com.au"
Const cdoSendUsingPickup = 2
'Const strPickup = "c:\Program Files\Exchsrvr\Mailroot\vsi 1\PickUp"
Const strPickup = "c:\Inetpub\mailroot\pickup"
Set iMsg = CreateObject("CDO.Message")
Set iConf = iMsg.Configuration
With iConf.Fields
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") =
cdoSendUsingPickup
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
mailServer
.Update
End With
With iMsg
.To = whoTo
.From = "We*******@mawa.org.au"
.subject = subject
.HTMLBody = body
.Send
End With
End Sub

Mar 24 '06 #2
decent article shows many ways to use CDOSYS which most servers support
http://www.powerasp.com/content/new/...ail_cdosys.asp

free code that is ready to send an email
http://www.powerasp.com/content/new/...ing_cdosys.asp
"Sivaswami Jeganathan" <j_*********@hotmail.com> wrote in message
news:u7**************@TK2MSFTNGP12.phx.gbl...
how to send email from an asp page ?

--
Sivaswami Jeganathan

Mar 25 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Erik T. Nomad | last post by:
I've created a link that will enable the reader of any page on my website to click it, enter an e-mail address, and have it arrive in that inbox with a hyperlink to the site. However, I'm...
4
by: tp | last post by:
HI... I have created simple .asp page and i would like to send my page as email using my outlook . is it possible to send form body as new email outlook body using mailto command or any other...
1
by: Mike John | last post by:
I want to send the page in the body of the email , just like the functionality of the send page in the browser explorer . I have tried the following systax <html> <body> <input type ="Button"...
9
by: Bob Jones | last post by:
We have developed a commercial ASP.net application (personal nutrition management and tracking); we want to send smtp email from within it. For our development box, we use WinXP Pro, IIS 5.5,...
14
by: supz | last post by:
Hi, I use the standard code given below to send an email from an ASP.NET web form. The code executes fine but no Email is sent. All emails get queued in the Inetpub mail queue. I'm using my...
9
by: Mahernoz | last post by:
Can i send an email from JavaScript? Is it possible? If yes please the code to send email using javascript...
10
by: Big Moxy | last post by:
I want to redirect the user back to the home page after submitting their form inquiry and display a message on the home page. I tried this in my send mail (apply.php) file - $_SESSION == "Thank...
1
by: jerger | last post by:
I have not made a program or page from start yet. I have made modifications to our signoff asp pages like changing the questions, texts, shortening field lengths etc... I also have copied the files...
3
digicrowd
by: digicrowd | last post by:
http://bytes.com/images/howtos/applemail_sig_icon.jpg You can make your emails fancy in Mail.app by using Rich Text formatting or even included Stationery. But, a simple way to send your own HTML...
2
by: anu b | last post by:
Now i am sending email to my friend using session variable... but my code is as below private bool SendEmail(string email) { try
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.