Jump to content

ASP Sending Mail


Guest alvarez

Recommended Posts

Guest alvarez
:) i'm trying to write an asp code for sending emails with CDO but i don't know whati can put before the code , and if i write it simple and save it like *.htm or *.asp , i don't have anything even not an error message.please i need some help cause it's happening with me with all the codes , I HAVE ALWAYS A BLANK PAGE.<%Set myMail=CreateObject("CDO.Message")myMail.Subject="Sending email with CDO"myMail.From="mymail@mydomain.com"myMail.To="someone@somedomain.com"myMail.TextBody="This is a message."myMail.Sendset myMail=nothing%>alikeita77@yahoo.fr
Link to comment
Share on other sites

hi, i think you must make a page that contain a form to fill the data in the form . 1 - you must make a page with exction .asp , that contain a form . when you are press submit , you must redirect to the page thats contain the sending mail via CDO . 2 - in the form page , you must use a form method "post" . ***************GOOD LUCKMaTar

  • Like 1
Link to comment
Share on other sites

you have to save it as .asp. Please post your full code.Since I don't know what your code is I will guess. chances are that if you are not getting any errors, the page is of type .asp, it is actually working.replace someone@somedomain.com with your email address and try it again. You should receive an email. As for the white screen that is because nothing is set to write to the screen but the code did it's job in the background. After this line

set myMail=nothing

add

Response.Write("Email Sent!")

This should write to the screen if everything worked right.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...