Thread: Asp send email
Results 1 to 1 of 1
Related
-
About forms and how to send them to an email Forum: HTML Forum
Replies: 4 -
I'm trying to send a text only email with formmail.asp Forum: ASP Forum
Replies: 0 -
i need your experience to send data to an email Forum: Javascript Forum
Replies: 1 -
Form wont send the content to the email address Forum: Website Scripts Forum
Replies: 3 -
how do i make a form that will send with from a certain email address? Forum: HTML Forum
Replies: 4
-
09-02-2010, 07:56 AM #1
Asp send email
I want to send mail from an asp page. The asp page is called from a html page. The sending mail using CDOSYS and CDO is not working properly. When i call the asp page from html page, the script for sending mail in the asp page is getting displayed while running rather than working of the process which i had mentioned in the script to work.
The runtime problem is that, when the asp file is being called from html file the script is getting displayed rather than the process to get worked.
HTML Code
HTML and CSS Syntax (Toggle Plain Text)
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
</head>
<body>
<form action=sendmail.asp method="POST">
<p><input type="text" name="T1" size="20"></p>
<p><input type="submit" value="Submit" name="B1">
<input type="reset" value="Reset" name="B2"></p>
</form>
</body>
</html>
ASP File "sendmail.asp" code
*****************************
HTML and CSS Syntax (Toggle Plain Text)
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<%
function sendmail()
{
Set myMail=CreateObject("CDO.Message")
myMail.Subject="Sending email with CDO"
myMail.From="rksvidhya@yahoo.com"
myMail.To="swornavidhya.mahadevan@gmail.com"
myMail.TextBody="This is a message."
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtsperver") = "smtp.gmail.com";
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465;
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2;
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate")= 1;
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = "true";
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusername") = "swornavidhya.mahadevan@gmail.com";
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "************"; // My gmail password.
myMail.Configuration.Fields.Update
myMail.Send
set myMail=nothing
response.write("<script> alert('Process Successful.')</script> ");
}
%>
</head>
<body>
</body>
</html>
Kindly help me at the earliest.
M.Sworna Vidhya
Cloudjiffy- PaaS for Developers
10-05-2020, 12:30 AM in Web Hosting Forum