Posted on 1 Comment

The ASP Butt Kicking Saga

Hurdle 2 is now complete! The host’s local SMTP server is not configured correctly. The website is hosting its pop/smtp email else where. Using Method 3 of Sending email using CDOSYS ( THE REAL DEAL ) I was able to finally get email to send!

Method 3 ( Using remote mail server )

<% Dim ObjSendMail Set ObjSendMail = CreateObject("CDO.Message") 'This section provides the configuration information for the remote SMTP server. ObjSendMail.Configuration.Fields.Item ("") = 2 'Send the message using the network (SMTP over the network). ObjSendMail.Configuration.Fields.Item ("") ="" ObjSendMail.Configuration.Fields.Item ("") = 25 ObjSendMail.Configuration.Fields.Item ("") = False 'Use SSL for the connection (True or False) ObjSendMail.Configuration.Fields.Item ("") = 60 ' If your server requires outgoing authentication uncomment the lines bleow and use a valid email address and password. 'ObjSendMail.Configuration.Fields.Item ("") = 1 'basic (clear-text) authentication 'ObjSendMail.Configuration.Fields.Item ("") ="" 'ObjSendMail.Configuration.Fields.Item ("") ="yourpassword" ObjSendMail.Configuration.Fields.Update 'End remote SMTP server configuration section== ObjSendMail.To = "" ObjSendMail.Subject = "this is the subject" ObjSendMail.From = "" ' we are sending a text email.. simply switch the comments around to send an html email instead 'ObjSendMail.HTMLBody = "this is the body" ObjSendMail.TextBody = "this is the body" ObjSendMail.Send Set ObjSendMail = Nothing %>

In addition to what you see here there are plenty of properties you can add to these examples.
Here are a few examples.

Carbon Copy
ObjSendMail.CC = “”

Blind Carbon Copy
ObjSendMail.BCC = “”

Send Attachment (we hard code it here, but you could specify the file path using Server.Mappath as well)
ObjSendMail.AddAttachment “c:\myweb\somefile.jpg”

and a ton of other things you can do…

Pages I found useful during this hurdle:

See also Microsoft’s CDOSYS Documentation.

The final hurdle is rewriting their document management system. Presently, they have an admin piece that uploads documents to a single directory. The documents are then accessible to their customers. They want the ability to classify those documents. The approach will be to allow the documents to live in subdirectories representing the categories. This should be interesting.

1 thought on “The ASP Butt Kicking Saga

  1. […] I work in ColdFusion a lot. I also work in PHP a lot. Just did a round of work on ASP. Working on web applications involves integral knowledge of Javascript, CSS, HTML, and a variety of […]

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.