Forums
This topic is locked
HELP - Send email using Outlook
06 Jul 2002 14:40:17 ilan co posted:
i need help to convert a vba code to asp pagei wont to send email using Microsoft Outlook
-------------------------------------------------
You can send emails using Outlook also. You can send email over Microsoft Exchange with this object (or another email server, using IMAP/POP).
<pre id=code><font face=courier size=2 id=code> </font id=code></pre id=code>
Sub SendMailOutlook(aTo, Subject, TextBody, aFrom)
'Create an Outlook object
Dim Outlook 'As New Outlook.Application
Set Outlook = CreateObject("Outlook.Application"
'Create e new message
Dim Message 'As Outlook.MailItem
Set Message = Outlook.CreateItem(olMailItem)
With Message
'You can display the message To debug And see state
'.Display
.Subject = Subject
.Body = TextBody
'Set destination email address
.Recipients.Add (aTo)
'Set sender address If specified.
Const olOriginator = 0
If Len(aFrom) > 0 Then .Recipients.Add(aFrom).Type = olOriginator
'Send the message
.Send
End With
End Sub
<pre id=code><font face=courier size=2 id=code> </font id=code></pre id=code>
thanks
Replies
Replied 06 Jul 2002 14:51:48
06 Jul 2002 14:51:48 Owen Eastwick replied:
You are way over complicating things. To open the clients default E-mail program just place a link on the page soething like this:
<a href="mailto: ">Email Us</a>
Regards
Owen.
Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo
<a href="mailto: ">Email Us</a>
Regards
Owen.
Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo
Replied 06 Jul 2002 20:19:48
06 Jul 2002 20:19:48 ilan co replied:
tanks but i wont to use it on asp page
insted of SMTP
and i wont to post the data form
can i use OUTLOOK thet on the server like SMTP server ?
and the data come from field or data
THE SMTP server not work !
insted of SMTP
and i wont to post the data form
can i use OUTLOOK thet on the server like SMTP server ?
and the data come from field or data
THE SMTP server not work !