Need some code to send an email with the Microsoft Internet Controls 
Author Message
 Need some code to send an email with the Microsoft Internet Controls

Hi I'm french
Can you send me some code on how to connect,authenticate,create
docheaders and send an email with the Microsoft Internet Controls?
I have ever read the Help
Thanks



http://www.*-*-*.com/ ~sydney
http://www.*-*-*.com/



Fri, 20 Aug 1999 03:00:00 GMT  
 Need some code to send an email with the Microsoft Internet Controls

Hope this Helps. If not go to http://www.microsoft.com/kb
then select Visual Basic and type in ' mail ' .  / Kevin
====================
Option Explicit

Private Sub Command1_Click()

    Dim objSession As Object
    Dim objMessage As Object
    Dim objRecipient As Object

    'Create the Session Object
    Set objSession = CreateObject("mapi.session")

    'Logon using the session object
    'Specify a valid profile name if you want to
    'Avoid the logon dialog box
    objSession.Logon profileName:="MS Exchange Settings"

    'Add a new message object to the OutBox
    Set objMessage = objSession.Outbox.Messages.Add

    'Set the properties of the message object
    objMessage.subject = "This is a test."
    objMessage.Text = "This is the message text."

    'Add a recipient object to the objMessage.Recipients collection
    Set objRecipient = objMessage.Recipients.Add

    'Set the properties of the recipient object
    objRecipient.Name = "John Doe"  '<---Replace this with a valid
                                    'display name or e-mail alias
    objRecipient.Type = mapiTo
    objRecipient.Resolve

    'Send the message
    objMessage.Send showDialog:=False
    MsgBox "Message sent successfully!"

    'Logoff using the session object
    objSession.Logoff
End Sub

Run the project. Click Command1.
You have sent e-mail from Visual Basic.



Quote:
> Hi I'm french
> Can you send me some code on how to connect,authenticate,create
> docheaders and send an email with the Microsoft Internet Controls?
> I have ever read the Help
> Thanks



> http://www.worldnet.fr/~sydney
> http://www.mygale.org/10/xrodman



Tue, 24 Aug 1999 03:00:00 GMT  
 Need some code to send an email with the Microsoft Internet Controls
Quote:

> Sydney,

> The Microsoft Internet Controls are beta and are about to expire.  Your
> application will cease to work when that happens.

> For a better alternative, have a look at our IDSMail OLE Server at
> http://www.intuitive-data.com.  Here is all the code you would need to
> send an SMTP message:

> Dim idsMail as Object
> Set idsMail = CreateObject("IDSMailInterface.Server")
> idsMail.ObjectKey = "ABC123"
> idsMail.MailSystem =IDSM_SYS_SMTP_POP
> idsMail.SMTPServer = "myprovider.com"
> idsMail.NewMessage



> = "Meeting Agenda" idsMail.Message = "Here is the agenda for the weekly
> meeting." idsMail.AddAttachment "C:\MEETINGS\AGENDA.DOC"
> idsMail.Send

> --
> Regards,

> Eric June
> Intuitive Data Solutions

> --------- We Make OLE Servers Intuitive --------------

> Intuitive Data Solutions
> Send/Rcv Email *EASILY* through SMTP/POP, VIM, MAPI, MHS & VINES.
> http://www.intuitive-data.com/idsmail.htm
> ------------------------------------------------------



Thu, 26 Aug 1999 03:00:00 GMT  
 Need some code to send an email with the Microsoft Internet Controls
Quote:

> Hope this Helps. If not go to http://www.microsoft.com/kb
> then select Visual Basic and type in ' mail ' .  / Kevin
> ====================
> Option Explicit

> Private Sub Command1_Click()

>     Dim objSession As Object
>     Dim objMessage As Object
>     Dim objRecipient As Object

>     'Create the Session Object
>     Set objSession = CreateObject("mapi.session")

>     'Logon using the session object
>     'Specify a valid profile name if you want to
>     'Avoid the logon dialog box
>     objSession.Logon profileName:="MS Exchange Settings"

>     'Add a new message object to the OutBox
>     Set objMessage = objSession.Outbox.Messages.Add

>     'Set the properties of the message object
>     objMessage.subject = "This is a test."
>     objMessage.Text = "This is the message text."

>     'Add a recipient object to the objMessage.Recipients collection
>     Set objRecipient = objMessage.Recipients.Add

>     'Set the properties of the recipient object
>     objRecipient.Name = "John Doe"  '<---Replace this with a valid
>                                     'display name or e-mail alias
>     objRecipient.Type = mapiTo
>     objRecipient.Resolve

>     'Send the message
>     objMessage.Send showDialog:=False
>     MsgBox "Message sent successfully!"

>     'Logoff using the session object
>     objSession.Logoff
> End Sub

> Run the project. Click Command1.
> You have sent e-mail from Visual Basic.



> > Hi I'm french
> > Can you send me some code on how to connect,authenticate,create
> > docheaders and send an email with the Microsoft Internet Controls?
> > I have ever read the Help
> > Thanks



> > http://www.worldnet.fr/~sydney
> > http://www.mygale.org/10/xrodman



Thu, 26 Aug 1999 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Need to code sending email to various recipients

2. Need macro or VB code to send multiple emails

3. Send/Receive email using MAPI code needed...

4. Need info on sending email with eVB code

5. NEED dependency file for Microsoft Internet Control Pack

6. Need Help: Microsoft Internet Transfer Control

7. Help needed using Microsoft Internet Transfer Control for FTP

8. Microsoft Internet Transfer Control Help needed.

9. Need Help: Microsoft Internet Transfer Control

10. Need Help: Microsoft Internet Transfer Control

11. how to send notification email when new email arrives (help needed, please)

12. Need help sending email UUENCODED with MAPI controls with VB6

 

 
Powered by phpBB® Forum Software