Hi,
From my VB 6.0 program, I want to send email to any email with attachment addresses.
I have access to a mail server - with sufficient privileges to relay messages from.

I tried, Dim objSendMail As CDONTS.NewMail - object for this.

1. mail could be sent only to an address in the above mail server only, not to yahoo/gmail
addreses.

2. I attahced a .pdf file, but that was received in non-readable format, what went wrong.

3. Which email class is best suited for sending mail from vb 6.0, running in Windows 2003 server



below give the code for sending mail
Sub SendEmail()
Const constRoutine As String = "SendEmail"

Dim strSendTo As String
Dim objSendMail As CDONTS.NewMail
Dim i As Integer

On Error GoTo TryMAPI

'Do not cause the user a major error, just log the error and keep going
'If SendTo = "" Then Exit Sub

Set objSendMail = New CDONTS.NewMail

With objSendMail
On Error Resume Next
.From = "[email protected]"

.To = "[email protected]" 'SendTo

.Subject = "see the vb 18.36"
.Body = "see the vb mail 18.36"

.AttachFile ("Cfrty_dfgt.pdf")
.Send
End With

MsgBox "Ok.."

End Sub