NEW LISTINGS  HOT LISTINGS  TOP RATED  EDITOR PICK  ADD A LISTING  UPDATE A LISTING  GET RATED  UPGRADE A LISTING
  HOME     MY ACCOUNT     POWER SEARCH     REGISTER     MEMBER LIST     SUGGEST CATEGORY  

Average Visitor Rating: 0.00 (out of 5)
Number of ratings: 0 Votes

Visitor Rating

Sending email from a form
2735 Sending email from a form http://CoverYourASP.com/ContactDescr.asp I've always offered you the source code for my forms (in fact you can download the entire site), but it's now time to step through the code with you and explain the code in more detail. ASP > Tips and Tutorials > Email Systems Oct 10, 2006

Write a Review   Add to My Favorite   Refer it to Friend   Report Broken Link  

Bookmark Sending email from a form:


Other links at ASP > Tips and Tutorials > Email Systems
If you are using a Windows 2000 / 2003 Server, or even XP Pro chances are that CDOSYS is your best bet for sending email from Active Server Pages. That is because CDOSYS is installed on all of them by default. Gone are the days of using CDONTS which was the old way of sending email from ASP. CDOSYS is it's replacement.

That being said there are actually a lot of ways to configure and use CDOSYS. When I 1st started using CDOSYS I assumed the CDOSYS code I was using would work in any situation, but that is not the case. This is something most articles about CDOSYS do not mention so I am going to show you 3 different CDOSYS examples each sending email using a slightly different method.
Method 1 involves sending email using a local pickup directory. Meaning you have the IIS SMTP Virtual Server Running. If you are on a local development machine this is probably for you. Under this scenario any emails you send from your scripts put a ".eml" file in the local pickup directory. Then hopefully the SMTP Virtual Server grabs the file and sends it off. The Virtual SMTP server is however known to hiccup and not send out the emails right away.
Method 2 involves port forwarding. I am not exactly sure how you set that up on the server but the code I wrote for it works under that scenario. The hosting company known as Verio actually implements this with CDOSYS on their servers. I actually implemented this method in some of my software because of a customer that couldn't get emails to send on one of their servers.
Method 3 involves sending the email using a remote mail server. This supports outgoing SMTP authentication should your server require that for outgoing emails. Many do these days. This method is also the best method to use because you are using a real email server with valid MX records. Many modern email systems block emails that do not have valid MX records and you want your emails to reach the recipients.
Category:

Learn how to email the contents of a form using the CDONTS component from ASP.
Category:

Mostly Web sites are hosted in remote locations. Users' private information, like registered profile and orders, collected in those sites needs to be securely transferred for processing or analysis. PGP can be used to send such information securely in an encrypted e-mail format. The transfer of this information can be triggered immediately after it gets added/updated on a remote site.
Category:

Sending an email with asp is fairly easy, all you need is CDONTS (Collaboration Data Objects for NT Server, installed with IIS), or a special component like AspEmail ( free ) by Persits Software Inc (there are more available).
Category:

Here's the Basic code for using CDO for emailing on an NT / IIS server. You must include the first section to instantiate the object, and the rest are the standard email sections. Be sure to fill in valid email addresses in the FROM and TO sections below.
Category:




Main Category
185
2034
801
286
174
1803
1129
909
1161
7393
70
905
59
2200
174

Join Mailing List
Joining mailing list will entitle you to receive occasional emails informing you of news and updates to the site and any special offers that may be of interest to you.



Top 10
Directory Statistics

Links: 19263
Categories: 1275
Registered Users: 735
Mailing List Subscribers: 2043
Unique Outgoing Hits: 228392

Pagerank Statistics
PR 10
2 site(s)
PR 9
9 site(s)
PR 8
38 site(s)
PR 7
291 site(s)
PR 6
827 site(s)
PR 5
2012 site(s)

PHP News