InternetMail.Logon

Syntax:

Logon(<MailProfile>, <ReceivingProtocol>)

Parameters:

<MailProfile> (required)

Type: InternetMailProfile.
A user profile for logging on to the mail server.

<ReceivingProtocol> (optional)

Type: InternetMailProtocol.
Specifies the type of connection, which is used when connecting to the Internet mail.
If you need to use the IMAP, then you should specify the corresponding type.
Default value: POP3.

Description:

It connects to the mail server to send/receive mail.

Availability:

Thin client, server, thick client, external connection, Mobile application (client), Mobile application (server).

Note:

Simultaneous connection is both to servers for receiving emails (POP3/IMAP) and to servers for sending emails (SMTP), if respective addresses are specified in the profile.

Example:

// property values are used as example
Profile = New InternetMailProfile;
Profile.SMTPServerAddress = 1c.ru;
Profile.POP3ServerAddress  = 1c.ru;
Profile.SMTPPort = 25;
Profile.POPPort3 = 110;
Profile.User = "user";
Profile.Password = "password";
Mail = New InternetMail;
Mail.Logon(Profile);

See also:

InternetMailProfile

    

1C:Enterprise Developer's Community