Click here to Skip to main content
15,922,696 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: code being displayed at the top of the page Pin
todd.010111018-Sep-06 4:23
todd.010111018-Sep-06 4:23 
GeneralRe: code being displayed at the top of the page Pin
Jason Weibel8-Sep-06 7:26
Jason Weibel8-Sep-06 7:26 
QuestionSql Express , SqlServer Pin
Eric Goedhart7-Sep-06 5:10
professionalEric Goedhart7-Sep-06 5:10 
AnswerRe: Sql Express , SqlServer Pin
Kevin McFarlane7-Sep-06 5:32
Kevin McFarlane7-Sep-06 5:32 
GeneralRe: Sql Express , SqlServer Pin
Eric Goedhart7-Sep-06 5:34
professionalEric Goedhart7-Sep-06 5:34 
AnswerRe: Sql Express , SqlServer Pin
Jerry Hammond7-Sep-06 8:48
Jerry Hammond7-Sep-06 8:48 
QuestionHow to Print a GridViews content on a button click Pin
sleonard847-Sep-06 4:54
sleonard847-Sep-06 4:54 
Questioncdosys Bouncing Emails Pin
ABC : AlphaBravoCharlie7-Sep-06 4:11
ABC : AlphaBravoCharlie7-Sep-06 4:11 
Hello All,

I am using CDOSYS in my Email Marketing Web Application. Given below is the code that i use to send an email.. and it works, I am not able to detect if the file has bounced back. I am working on the Delivery Report and this is my first step towards it. I know there are lot of components out there that can manage all this for me. but i believe it is possible within the features offered by CDOSYS. The following link seems explaining it.

http://support.microsoft.com/?scid=kb;en-us;302839&spid=6384&sid=67

The code i used.

Function SendTestMails(ByVal strHTML As String, ByVal strToEmailID As String) As Boolean

Dim dtMember As DataTable
Dim strFromMailId, strSMTPserver, strSMTPusername, strSMTPpassword, strSMTPport As String

Try
dtMember = pi_obj_Member.GetMembers(2)
Catch ex As Exception
System.Diagnostics.Debug.WriteLine(ex.Message)
End Try

If dtMember.Rows.Count > 0 Then
strFromMailId = "me@company.com"
strSMTPserver = "NNN.NN.NN.NN"
strSMTPusername = "MyUserName"
strSMTPpassword = "MyPassword"
strSMTPport = "25"

Const cdoSendUsingPickup = 1 'Send message using the local SMTP service pickup directory.
Const cdoSendUsingPort = 2 'Send the message using the network (SMTP over the network).

Const cdoAnonymous = 0 'Do not authenticate
Const cdoBasic = 1 'basic (clear-text) authentication
Const cdoNTLM = 2 'NTLM

Dim objMessage As Object
objMessage = CreateObject("CDO.Message")
objMessage.Subject = "This is a test message"
objMessage.From = strFromMailId
objMessage.To = strToEmailID
objMessage.HTMLBody = CStr("" & strHTML)

'==This section provides the configuration information for the remote SMTP server.

objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2

'Name or IP of Remote SMTP Server
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strSMTPserver

'Type of authentication, NONE, Basic (Base64 encoded), NTLM
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoBasic

'Your UserID on the SMTP server
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusername") = strSMTPusername

'Your password on the SMTP server
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendpassword") = strSMTPpassword

'Server port (typically 25)
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = strSMTPport '25

'Use SSL for the connection (False or True)
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False

objMessage.Configuration.fields("urn:schemas:mailheader:disposition-notification-to") = "me@company.com"
objMessage.Configuration.fields("urn:schemas:mailheader:return-receipt-to") = "me@company.com"
objMessage.Configuration.Fields.Update()

'==End remote SMTP server configuration section==
Try
objMessage.Send()
Catch ex As Exception
System.Diagnostics.Debug.WriteLine(ex.Message)
End Try

objMessage = Nothing
End If

End Function

Alpha/Bravo\Charlie

QuestionGradient in Tbale object Pin
Ista7-Sep-06 3:33
Ista7-Sep-06 3:33 
AnswerRe: Gradient in Tbale object Pin
Ista7-Sep-06 4:22
Ista7-Sep-06 4:22 
GeneralRe: Gradient in Tbale object Pin
RichardGrimmer7-Sep-06 5:33
RichardGrimmer7-Sep-06 5:33 
Questionhow to execute sql script file. Pin
Amit Agarrwal7-Sep-06 2:22
Amit Agarrwal7-Sep-06 2:22 
AnswerRe: how to execute sql script file. Pin
Not Active7-Sep-06 2:30
mentorNot Active7-Sep-06 2:30 
GeneralRe: how to execute sql script file. Pin
Amit Agarrwal7-Sep-06 2:45
Amit Agarrwal7-Sep-06 2:45 
GeneralRe: how to execute sql script file. Pin
Not Active7-Sep-06 3:55
mentorNot Active7-Sep-06 3:55 
AnswerRe: how to execute sql script file. Pin
Ista7-Sep-06 3:34
Ista7-Sep-06 3:34 
GeneralRe: how to execute sql script file. Pin
Amit Agarrwal7-Sep-06 3:38
Amit Agarrwal7-Sep-06 3:38 
QuestionConcurrency problem in asp.net Pin
Balji7-Sep-06 2:03
Balji7-Sep-06 2:03 
AnswerRe: Concurrency problem in asp.net Pin
Jay_se7-Sep-06 2:24
Jay_se7-Sep-06 2:24 
AnswerRe: Concurrency problem in asp.net Pin
Ista7-Sep-06 3:38
Ista7-Sep-06 3:38 
GeneralRe: Concurrency problem in asp.net Pin
todd.010111017-Sep-06 5:18
todd.010111017-Sep-06 5:18 
GeneralRe: Concurrency problem in asp.net Pin
Ista7-Sep-06 9:13
Ista7-Sep-06 9:13 
AnswerRe: Concurrency problem in asp.net Pin
Amit Kumar G11-Sep-06 9:42
Amit Kumar G11-Sep-06 9:42 
QuestionStucked with System.Net.Sockets.SocketException Pin
David Clerk7-Sep-06 0:39
David Clerk7-Sep-06 0:39 
QuestionNeed help Pin
Trehan7-Sep-06 0:10
Trehan7-Sep-06 0:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.