PreviousNext
Help > Programming with LAUNCHER Office > LNCCMD commands > Commands list > MAILSMTP command
MAILSMTP command

 

SMTP compatible.

 

Sets connection to SMTP server.

 

This command must be called first before sending any SMTP protocol messages.
The first parameter contains the different properties, separated by semicolon.

 

Syntax

 

CHGVAR

VAR(&CMD) VALUE('MAILSMTP')

CHGVAR

VAR(&PARM1) VALUE('
Server="SMTP server";

Sender="email address of sender"
[ ;UserId="SMTP user"]
[ ;password=Password of the SMTP user]
[ ;reply="email address receiving answers"]
[ ;logfile="path of the logfile"]
[ ;port= port number of the SMTP server ]

[ ;enableSSL=true/false ]

[ ;SSLType=SMTPS/TLS ]

[ ;Sign=true/false ]

[ ;Encrypt=true/false ]

[ ;Certif="path of the certificate .p12"]
[ ;PwdCertif=certificate password]

[ ;Timeout=in seconds]

[ ;SecureHeaders=true/false ]

[ ;WrapperSubject="Sujet du wrapper RFC 822"]

[ ;checkMail=true/false]

[ ;useTestMode=true/false]

')

CHGVAR

VAR(&PARM2) VALUE(' ')

CALL

PGM(LNCCMD) PARM(&HANDLE &CMD &OPT &PARM1 +

&PARM2 &RESULT)

 

Parameters

 

Parameters

 

Parm1

SMTP connection properties* list.

 

 

*Properties

 

sender

Message sender address. Mandatory.

 

Server

SMTP server name or IP address. Mandatory.

 

UserId

SMTP user profile. Optional.

 

password

User password. Optional.

 

reply

Address of the person who receives the responses to the message sent, if different of the sender address. Optional.

 

logfile

Path and file name to store sended messages traces.
It allows checking if message sending was performed without error.
This file is formatted with separators (;), this allows it to be imported in database or Excel.
Optional.

 

port

 

EnableSLL

 

 

 

SSLType

 

 

 

 

 

 

 

 

Sign

 




 

Encrypt

 

 

 

 

 

Certif

 

 

PwdCertif

 

Timeout



SecureHeaders

 

 



WrapperSubject

 

 



CheckMail

 

 

 

 


UseTestMode

 

SMTP server port, if port 25 is not used. Optional.

 

True/False (default). If true, By defauly, Launcher uses the TLS protocol.

You can also use SMTPS (SMTP over SSL) by using the SSLType parameter

 

Two possible values: TLS (default) and SMTPS.

TLS : Launcher supports Secure SMTP on TLS as defined in RFC 3207. In this mode, the SMTP session starts on an unencrypted channel, and then a STARTTLS command is issued by the client to the server to switch to secure communication via SSL. See RFC 3207 published by the Internet Engineering Task Force (IETF) for more information. Generally port 587 is used.

 

SMTPS: Also called SMTP/SSL or SMTP over SSL. Port 465 is generally used. Communication is secured via SSL from the start of the connection.

 

True/False (default). If true, Launcher signs the email sent, as defined in RFC 8551. It uses the certificate (.p12) specified with the Certif parameter.
Complies with S/MIME Version 4.0 and RFC 8551. See
RFC 8551 published by the Internet Engineering Task Force (IETF) for more information.

 

True/False (default). If true, Launcher encrypts the email sent, as defined in RFC 8551. It uses the certificate (.p12) specified with the Certif parameter.
Complies with S/MIME Version 4.0 and RFC 8551. See
RFC 8551 published by the Internet Engineering Task Force (IETF) for more information

 

Full path of the certificate (.p12) used to encrypt and/or sign the email.



Certificate (.p12) password used to encrypt and/or sign the email.


T
imeout for operation, in seconds.


Protection of headers through the use of a RFC 822 message.
A message/rfc822 wrapper is used to apply S/MIME security services to headers.
See RFC 8551 for more details. The email will be received as an attachment by the recipient.


If SecureHeaders=true, by default the recipient will receive an email without subject and an attachment containing the specified email.
You can specify a subject here in order to prevent the email from going into spam.


True/False (default). If true, a verification of the recipients' email addresses will be performed according to the RFC 5322 standard, before sending.

Verification will be effective for MAILPREP, MAILTO and MAILCC commands.


True/False (default). If true, a test SMTP server, which uses a self-signed certificate, can be used. Not to be used in production.

 

Example

 

LNCCMD     CMD(MAILSMTP) +  
PARM1('SERVER="SMTP.AURA.FR";SENDER="TECH+  
@EASYCOM-AURA.COM";REPLY="TECH@EASYCOM-+  
AURA.COM";logfile="c:\temp\logaurasmtp.txt"')  

 

See also

 

LNCSNDMAIL - CL Command

MAILPREP

MAILLATT

MAILTEXT

MAILSUBJ

MAILSEND

MAILEND

MAILBODYF

MAILCC