Hi to All,
I have this kind of problem.
I have a page
index.asp, in which there is a button that onclick recalls another page called
mail.aspThis is the content of
mail.asp:
<%@ Language=VBScript %>
<%
Option Explicit
Dim mail, sender
sender = Request.Form("user")
'
Set mail=CreateObject("CDO.Message")
mail.To="pluto@iol.it"
mail.From="pippo@iol.it"
mail.Subject="The Ticket has been SUBMITTED !"
mail.HTMLBody="<b>Proj: </b>" & Request.Form("proj") & "<br>" &_
"<b>Product: </b>" & Request.Form("pro") & "<br>" &_
"<b>User: </b>" & Request.Form("user") & "<br><br>" &_
.........
"<b>Notes: </b>" & Request.Form("notes_2") & "<br><br>"
mail.Send
Set mail=nothing
%>
This code is perfect but:
using
CDO.Message we have no certainty that the receiver receives well the email,
there is no way to alert if the email, for some reasons (maybe related to some problem of internal server) don' t arrive at destination.
In fact we used this way of sending email and sometimes emails will not arrive, and we don' t know why.
So I ask if it is possible that when the user fills the fields in the form of
index.asp, and push the button that recalls
mail.asp,
can send email using
CDO.Message but via Microsoft
Outlook, that is the official intranet application for the emails.
In this case the user is sure that the different fields are good and, clicking send, can submit the email to the receiver.
I know that ASP is in server side and Outlook is member of client side ...
I have found in internet this useful link:
http://www.motobit.com/tips/detpg_send-email-from-asp/
that tells that is possible to send email using
CDO.Message and
Outlook.
I have tried to create a page
mail.asp in this way but happens nothing:
<%@ Language=VBScript %>
<%
Option Explicit
Dim Outlook
Set Outlook = CreateObject("Outlook.Application")
'
Dim Message, aFrom, aTo
aFrom = "pippo@iol.it"
aTo = "pluto@iol.it"
Set Message = Outlook.CreateItem(olMailItem)
With Message
.Subject = "Ciao"
.Body = "Test"
.Recipients.Add (aTo)
Const olOriginator = 0
If Len(aFrom) > 0 Then .Recipients.Add(aFrom).Type = olOriginator
.Send
'
End With
%>
Thanks in advance !!!