Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
bb2003
Starting Member
6 Posts |
Posted - 2009-02-05 : 16:56:14
|
Hi,I set up CDO to send email from DTS, and it works properly until we changed our domain due to company transition. Below is the code I used inside of ActiveX script. dim cdoConfig, cdoMessage, smtpServer, EmailTo, EmailFrom, EmailCC Set cdoConfig = CreateObject("CDO.Configuration") Set cdoMessage = CreateObject("CDO.Message") With cdoConfig .Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "SMTP Server Name" .Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 .Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 .Fields.Update End With Set cdoMessage.Configuration = cdoConfig With cdoMessage .From = "email" .To = "email" .Send End With Set cdoMessage = Nothing Set cdoConfig = NothingWhen I run it, it will show me "ActiveX Scripting encountered a Run Time Error during the execution of the script". I don't know where to look at it. Also could anyone tell me the smtpserverport 25 is the default or we must set up as it? It should be outgoing or imcoming port? This CDO code is working for pop3, right?What is wrong with the code? Anyone can help?Thanks,Megan |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|