Guest alvarez Posted January 25, 2006 Share Posted January 25, 2006 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 More sharing options...
jorge Posted January 25, 2006 Share Posted January 25, 2006 Have you create a virtual directory first? asp files need that to be executed. It is explained better here:http://www.w3schools.com/asp/asp_install.asp Link to comment Share on other sites More sharing options...
Matar Posted January 26, 2006 Share Posted January 26, 2006 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 1 Link to comment Share on other sites More sharing options...
aspnetguy Posted January 27, 2006 Share Posted January 27, 2006 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now