Building my own "SMTP" mail - control ?

  • Thread starter Thread starter Screaming Eagles 101
  • Start date Start date
S

Screaming Eagles 101

How can I make my own Mail control (unvisible one) to use
with a form ? Does anyone know where to find code ?

I would like to fill in some parameters, and then send a mail, a bit like
this :

'Button1_click...
Dim dllMail as Object
Set dllMail = CreateObject("MyDll.SendMail")
With dllMail
.SmtpAddress = "mySmtpName"
.SmtpPort = 25
.Sender = "myname"
.To = "to who"
.CC = "to as copy"
.BCC = "to as blind CC"
.Subject = "subject of the mail"
.BodyText = "bodytext of the mail"
.Attachment = "some filepath to a file"

.StartCommunication

If .SmtpState = smtpabended Then
'Error Logging
Else
MsgBox "Mail OK"
End If

Set dllMail = Nothing
End With
'end click event....
--
Filip
http://www.ww2airborne.net/
Official Site of the 101st Airborne - 463rd PFA
skype: airborne463pfa-fiwi
-------------------------------------------------
 
Why recreate the wheel?

Check System.Net.Mail.MailMessage.

I think it already does what you want and it is VERY easy to use.

Rick
 
Rick said:
Why recreate the wheel?

Check System.Net.Mail.MailMessage.

I think it already does what you want and it is VERY easy to use.

Rick


Wow, I was still thinking VB6, that should be solved more easily now,
thanks !
--
Filip
http://www.ww2airborne.net/
Official Site of the 101st Airborne - 463rd PFA
skype: airborne463pfa-fiwi
-------------------------------------------------
 
Back
Top