Hi all,
Guess what.... my vb.exe didn't work in sending an autoemail to our daily artist spotlight. What's going on is that the server is still executing the script but the email isn't being sent out.
I'm starting to think it's the connection string I'm using or ASP Mailer.
DZ
* Here's the code *
First, the connection string:
***********
Dim Connect, Connect_String, rsSpotlight, strSpotlightQ
set Connect = Server.CreateObject("ADODB.Connection")
Connect_String = "PROVIDER=SQLOLEDB;Data Source=databaseserver;Initial Catalog=name;USER ID=username;PASSWORD=9999999;"
Connect.Open Connect_String
set rsSpotlight = Server.CreateObject("ADODB.Recordset")
set rsSpotlight.ActiveConnection = Connect
strSpotlightQ = "Select * from AtlasSpotlight WHERE ID = '" & lnID & "'"
rsSpotlight.Open strSpotlightQ
*******
then I'm using a Server-Side include to read in the letter...
Dim strMessage
<!--#INCLUDE file="SpotlightLetter.asp"--> (this writes to strMessage)
***********
Then sending the email with ASP Mailer (I'm not using CDONTS because our server no longer supports it)
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.FromName = "Atlas Artist Spotlight"
Mailer.FromAddress = "
name@host.com"
Mailer.RemoteHost = "relay.host.com"
Mailer.Subject = "Your Spotlight Notification For " & Trim(rsSpotlight("Artist_Name"))
Mailer.AddRecipient Trim(rsSpotlight("Contact_Name")), Trim(rsSpotlight("Contact_Email"))
Mailer.cc = "
techperson@host.com", "
me@host.com"
Mailer.BodyText = strMessage
Mailer.SendMail
Set Mailer = nothing
rsSpotlight.Close
Connect.Close