|
<< Click to Display Table of Contents >> Navigation: Programming Mechworks PDM > DBWCommandShell > Commands Reference > PDMSystem > SendEMail |
Sends an e-mail using the definition contained in the assigned text file.
call DBWShell("SendEMail [emailDefinitionTxtFile]")
emailDefinitionTxtFile |
optional.the TXT file containing e-mail data |
If no parameter is passed, before calling the sendEmail command you've to call Email command to set all required data.
;
; MyEMailMsg.Txt DBWorks e-mail definition sample file
;
;assign the security protocol and SMTP server
USE_TLS
; possible Authentication modes are LOGIN (default when no parameter is specified) and PLAIN
TLS_AUTH_MODE PLAIN
;
; alternatively you can declare a specific port of the mail server
SMTP_SERVER mail.mymailserver.com:587
;in older mail servers (no authentication required) it could be enough the server name with no port specified
;SMTP_SERVER mail.mymailserver.com
;
;assign login information
LOGIN_USER [email protected]
LOGIN_PASSWORD xxxyyyzzz
;
; subject, from address and to address
;
SUBJECT DBWShell test email
NAME_FROM Cyro
ADDRESS_FROM [email protected]
;you can specify ONLY ONE RECEIVER as NAME_TO and ADDRESS_TO parameters
;
NAME_TO Luke
ADDRESS_TO [email protected]
;
; you can specify ONLY ONE NAME_CC but MANY ADDRESS_CC
;
NAME_CC MechWorks team
ADDRESS_CC [email protected]
ADDRESS_CC [email protected]
ADDRESS_CC [email protected]
;
;likewise you can specify ONLY ONE NAME_BCC but MANY ADDRESS_BCC
;NAME_BCC
;ADDRESS_BCC
;
;
; BODY_TXT is used for simple text e-mails:
; Example:
;
BODY_TXT This is my first e-mail from MechworksPDM ...
BODY_TXT I can add as many lines as I want to the message ...
BODY_TXT Ok. It is enough so far.
BODY_TXT Regards,
BODY_TXT Cyro
;
; BODY_HTML is used for text in HTML format:
; Example:
; BODY_HTML <html><body>
; BODY_HTML Hello World...
; BODY_HTML </body></html>
;
; Add here any file you want to attach to the e-mail
;
ATTACHMENT Z:\myAttachments\myAttachment 1.zip
ATTACHMENT Z:\myAttachments\myAttachment 2.zip