How to Set POP3 Server in MAPISession? 
Author Message
 How to Set POP3 Server in MAPISession?

I'm working on a VB module to send and receive E-mails using MAPISession and
MAPIMessage objects.  However, it seems that no "property" is provided to
define the POP3 and SMTP servers.

Can anyone help me?

Thanks!

Allen



Thu, 09 Oct 2003 13:32:43 GMT  
 How to Set POP3 Server in MAPISession?
Hope this helps :
(The controls are on a form called 'frmComerciaux')
----------------------------------------------------------------------------
-----------------------
Public Sub SndMes(msg As String, ToWhom As String, Subject As String,
Optional Attach As String)
    On Error Resume Next
    Exit Sub
    frmCommerciaux.MAPISession1.SignOn 'SESSION_SIGNON
              'Point the MAPI messages control to the open MAPI session:
    With frmCommerciaux.MAPIMessages1
            .SessionID = frmCommerciaux.MAPISession1.SessionID

            .Compose                    ' reset et prepare
            .MsgNoteText = msg & " "    'SVNote
            .MsgSubject = Subject

        If Attach <> "" Then
                'The following four lines of code add an attachment to the
message,
                'and set the character position within the MsgNoteText where
the
                'attachment icon will appear. A value of 0 means the
attachment will
                'replace the first character in the MsgNoteText. You must
have at
                'least one character in the MsgNoteText to be able to attach
a file.
            .AttachmentPosition = Len(msg) '( is -1 of real lenght)
                'Set the type of attachment:
'            If TypeOf Attach Is OLEObject Then
'                .AttachmentType = mapEOLE
'            Else
                .AttachmentType = mapData ' is 0 datafile
'            End If
                'Set the icon title of attachment:
            .AttachmentName = "De Immocom"
                'Set the path and file name of the attachment:
            .AttachmentPathName = Attach
        End If
        .MsgType = "IPM.Microsoft Mail.Note"
        If ToWhom = "" Then
            .Show False
            .Send True          ' let the user fill in the receipient
        Else
            .RecipAddress = ToWhom
            .Send True          ' for TESTENG : True, danach : false
        End If

    End With

'// till here
              'Close MAPI mail session:
    frmCommerciaux.MAPISession1.SignOff ' SESSION_SIGNOFF

End Sub
----------------------------------------------------------
Steven


Quote:
> I'm working on a VB module to send and receive E-mails using MAPISession
and
> MAPIMessage objects.  However, it seems that no "property" is provided to
> define the POP3 and SMTP servers.

> Can anyone help me?

> Thanks!

> Allen



Thu, 09 Oct 2003 14:50:03 GMT  
 How to Set POP3 Server in MAPISession?
When you use the objMapiSession.Logon method, there is a parameter called
'Profile' which you can define in your 'Control Panel'. This profile contains the
POP3 and SMTP-servers.
If you must check several servers, then you must create different profiles and log on
with these profiles.

HTH

Debbus

Quote:

> I'm working on a VB module to send and receive E-mails using MAPISession and
> MAPIMessage objects.  However, it seems that no "property" is provided to
> define the POP3 and SMTP servers.

> Can anyone help me?

> Thanks!

> Allen



Thu, 09 Oct 2003 16:38:52 GMT  
 How to Set POP3 Server in MAPISession?
Steven,

How can I find the form?
Thanks!

Allen

Quote:
> Hope this helps :
> (The controls are on a form called 'frmComerciaux')
> --------------------------------------------------------------------------
--
> -----------------------
> Public Sub SndMes(msg As String, ToWhom As String, Subject As String,
> Optional Attach As String)
>     On Error Resume Next
>     Exit Sub
>     frmCommerciaux.MAPISession1.SignOn 'SESSION_SIGNON
>               'Point the MAPI messages control to the open MAPI session:
>     With frmCommerciaux.MAPIMessages1
>             .SessionID = frmCommerciaux.MAPISession1.SessionID

>             .Compose                    ' reset et prepare
>             .MsgNoteText = msg & " "    'SVNote
>             .MsgSubject = Subject

>         If Attach <> "" Then
>                 'The following four lines of code add an attachment to the
> message,
>                 'and set the character position within the MsgNoteText
where
> the
>                 'attachment icon will appear. A value of 0 means the
> attachment will
>                 'replace the first character in the MsgNoteText. You must
> have at
>                 'least one character in the MsgNoteText to be able to
attach
> a file.
>             .AttachmentPosition = Len(msg) '( is -1 of real lenght)
>                 'Set the type of attachment:
> '            If TypeOf Attach Is OLEObject Then
> '                .AttachmentType = mapEOLE
> '            Else
>                 .AttachmentType = mapData ' is 0 datafile
> '            End If
>                 'Set the icon title of attachment:
>             .AttachmentName = "De Immocom"
>                 'Set the path and file name of the attachment:
>             .AttachmentPathName = Attach
>         End If
>         .MsgType = "IPM.Microsoft Mail.Note"
>         If ToWhom = "" Then
>             .Show False
>             .Send True          ' let the user fill in the receipient
>         Else
>             .RecipAddress = ToWhom
>             .Send True          ' for TESTENG : True, danach : false
>         End If

>     End With

> '// till here
>               'Close MAPI mail session:
>     frmCommerciaux.MAPISession1.SignOff ' SESSION_SIGNOFF

> End Sub
> ----------------------------------------------------------
> Steven



> > I'm working on a VB module to send and receive E-mails using MAPISession
> and
> > MAPIMessage objects.  However, it seems that no "property" is provided
to
> > define the POP3 and SMTP servers.

> > Can anyone help me?

> > Thanks!

> > Allen



Sat, 11 Oct 2003 01:52:31 GMT  
 How to Set POP3 Server in MAPISession?
How can I define the "Profile"?  How to use the profile through
objMapiSession.Logon method?

Where can I find more information about this topic?
(Note: I've tried to find more information about this in several VB's books,
but failed!  None of the books mention "profile")

Thanks!

Allen


Quote:
> When you use the objMapiSession.Logon method, there is a parameter called
> 'Profile' which you can define in your 'Control Panel'. This profile
contains the
> POP3 and SMTP-servers.
> If you must check several servers, then you must create different profiles
and log on
> with these profiles.

> HTH

> Debbus


> > I'm working on a VB module to send and receive E-mails using MAPISession
and
> > MAPIMessage objects.  However, it seems that no "property" is provided
to
> > define the POP3 and SMTP servers.

> > Can anyone help me?

> > Thanks!

> > Allen



Sat, 11 Oct 2003 02:08:49 GMT  
 How to Set POP3 Server in MAPISession?
http://msdn.microsoft.com/library/psdk/cdo/_olemsg_logon_method_sessi...
Quote:

> How can I define the "Profile"?  How to use the profile through
> objMapiSession.Logon method?

> Where can I find more information about this topic?
> (Note: I've tried to find more information about this in several VB's books,
> but failed!  None of the books mention "profile")

> Thanks!

> Allen



> > When you use the objMapiSession.Logon method, there is a parameter called
> > 'Profile' which you can define in your 'Control Panel'. This profile
> contains the
> > POP3 and SMTP-servers.
> > If you must check several servers, then you must create different profiles
> and log on
> > with these profiles.

> > HTH

> > Debbus


> > > I'm working on a VB module to send and receive E-mails using MAPISession
> and
> > > MAPIMessage objects.  However, it seems that no "property" is provided
> to
> > > define the POP3 and SMTP servers.

> > > Can anyone help me?

> > > Thanks!

> > > Allen



Sat, 11 Oct 2003 13:40:35 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. How to Set POP3 Server in MAPISession?

2. How to Set POP3 Server in MAPISession?

3. How to Set POP3 Server in MAPISession?

4. POP3 server and SMTP server cannot be found dialog box

5. MAPISession Font setting

6. Mark messages as read after recieving them from a pop3 server

7. Filter emails on POP3 server before downloading

8. VB - Check pop3 server

9. VB - Check pop3 server

10. Can VB.NET recive email from pop3 server?

11. question about working with pop3 mail servers

12. Accessing POP3 Server

 

 
Powered by phpBB® Forum Software