-
Emailing in VB6?
I had a friend, he could send me an email from an email he doesn't have. (ex: [email protected] or anything else.) He could send me any email too. He showed me the program, and let me use it, it was made in vb, but he would never give me the source. How Can I do this with vb6?
-
Re: Emailing in VB6?
i get enough spam already thanx
-
Re: Emailing in VB6?
Very helpful comment. This isn't for spam.
-
Re: Emailing in VB6?
If you have a mail server using exchange you could add a reference to:'Microsoft CDO for exchange' then use this code ?
Code:
Private Sub Command1_Click() 'send Email
Dim objMessage
On Error GoTo err:
Set objMessage = New CDO.Message
objMessage.Subject = "Test Message"
objMessage.From = "from.me.com" 'add any text here
objMessage.To = "to_your.friend.com"
objMessage.TextBody = "This is a test message"
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "192.168.26.1" 'enter IP address of your mail server
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objMessage.Configuration.Fields.Update
objMessage.Send
Set objMessage = Nothing
Exit Sub
err:
MsgBox "Error!" & vbNewLine & err.Description
Exit Sub
End Sub
-
Re: Emailing in VB6?
I don't have a mail server, neither did my friend.