Hello friends,
This is my first post on this forum. I am new to ASP.Net. Given below is the code that runs without error. But the receiver does not get email.
One more thing, I am confused to see that there is no need to login into the mail a/c of sender to send email. How it works actually?
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<Form action="sendMail.asp" Method="post">
<table>
<tr><td width="35%">Enter Email of Recepient : </td><td><input type="Text" name="email"></td></tr>
<tr><td width="35%">Enter Message : </td><td><Textarea rows="5" cols="50" name="Message"></textarea></td></tr>
<tr><td colspan="2" align="center"> <input type="Submit" Value= "Send Mail"></td></tr>
</table>
</Form>
<%
eml=Request.Form("email")
msg=Request.Form("Message")
if Request.Form("email")<>"" then
set ObjMail=CreateObject("CDO.Message")
response.write(eml &"/br")
response.write(msg &"/br")
ObjMail.Subject="This mail is sent through ASP.net using CDOSys"
ObjMail.From="myemail@mywebsite.com"
ObjMail.To=eml
ObjMail.TextBody=msg
ObjMail.Send
Set ObjMail=nothing
else
response.write ("Please enter email.")
end if
%>
</body></html>
- Ravindra
Hi,
Welcome to MSDN.
I am afraid that this is not the proper forum for this issue, since there is a dedicated forum for web development issues:
https://forums.asp.net
You could post this issue in that forum for more dedicated supports.
Thanks for your understanding.
Regards.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.