Home All Groups Group Topic Archive Search About

Building my own "SMTP" mail - control ?

Author
20 Oct 2006 11:17 AM
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
-------------------------------------------------

Author
20 Oct 2006 12:20 PM
Rick
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

Show quoteHide quote
" Screaming Eagles 101" <see_my_site@online.please> wrote in message
news:JeKdnQI81ZLYLaXYRVnyhA@scarlet.biz...
> 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
> -------------------------------------------------
>
>
Author
20 Oct 2006 2:25 PM
Screaming Eagles 101
"Rick" <R***@LakeValleySeed.com> schreef in bericht
news:%23obKpIE9GHA.3348@TK2MSFTNGP03.phx.gbl...
> 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
-------------------------------------------------
Author
20 Oct 2006 2:37 PM
rowe_newsgroups
Here's a site that may help:

http://www.systemnetmail.com/

Thanks,

Seth Rowe


Screaming Eagles 101 wrote:
Show quoteHide quote
> "Rick" <R***@LakeValleySeed.com> schreef in bericht
> news:%23obKpIE9GHA.3348@TK2MSFTNGP03.phx.gbl...
> > 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
> -------------------------------------------------
Author
20 Oct 2006 3:01 PM
Screaming Eagles 101
"rowe_newsgroups" <rowe_em***@yahoo.com> schreef in bericht
news:1161355069.780099.200210@e3g2000cwe.googlegroups.com...
> Here's a site that may help:
>
> http://www.systemnetmail.com/
>
> Thanks,
>
> Seth Rowe


WOAW, added this to my Favorites right away.... ;-)   (*!*)
--
Filip
http://www.ww2airborne.net/
Official Site of the 101st Airborne - 463rd PFA
skype: airborne463pfa-fiwi
-------------------------------------------------