Package com.mendix.modules.email
Class EmailModule
java.lang.Object
com.mendix.modules.email.EmailModule
This class can be used to send email. All methods behave in a similar way, there are
 just multiple methods for your convenience.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic voidmail(ISMTPConfiguration configuration, String msg, String subject, String to) Sends an email to to with subject subject and message msg.static voidmail(ISMTPConfiguration configuration, String msg, String subject, String to, IContext context, IMendixObject attachment) Sends an email to to with subject subject and message msg with attachment attachment using settings in configuration.static voidSends an email to to with subject subject and message as html, the shown message will be htmlmsg.static voidmail(ISMTPConfiguration configuration, String htmlmsg, String plainmsg, String subject, String to, IContext context, IMendixObject attachment) Sends an email to to with subject subject and HTML message htmlmsg with attachment attachment using settings in configuration.static voidmail(ISMTPConfiguration configuration, String htmlmsg, String plainmsg, String subject, List<String> to, List<String> cc, List<String> bcc, IContext context, List<IMendixObject> attachments) Sends an email to to, cc and bcc with subject subject and HTML message htmlmsg with attachments attachments using settings in configuration.static voidmail(ISMTPConfiguration configuration, String msg, String subject, List<String> to, List<String> cc, List<String> bcc, IContext context, List<IMendixObject> attachments) Sends an email to to, cc and bcc with subject subject and message msg with attachments attachments using settings in configuration.
- 
Constructor Details- 
EmailModulepublic EmailModule()
 
- 
- 
Method Details- 
mailpublic static void mail(ISMTPConfiguration configuration, String msg, String subject, String to) throws CoreException Sends an email to to with subject subject and message msg.- Parameters:
- configuration- the SMTP configuration that contains all information to send the email
- msg- the message to send
- subject- the subject of the email
- to- the recipients of the email message
- Throws:
- CoreException- if sending the email message by mail failed
 
- 
mailpublic static void mail(ISMTPConfiguration configuration, String msg, String subject, List<String> to, List<String> cc, List<String> bcc, IContext context, List<IMendixObject> attachments) throws CoreException Sends an email to to, cc and bcc with subject subject and message msg with attachments attachments using settings in configuration.- Parameters:
- configuration- the SMTP configuration that contains all information to send the email
- msg- the message to send
- subject- the subject of the email
- to- the recipients of the email message
- cc- the CC recipients
- bcc- the BCC recipients
- context- the context to use to check if the current user has the rights to access the attachments
- attachments- the attachments to send along with the email
- Throws:
- CoreException- if sending the email message by mail failed
 
- 
mailpublic static void mail(ISMTPConfiguration configuration, String htmlmsg, String plainmsg, String subject, List<String> to, List<String> cc, List<String> bcc, IContext context, List<IMendixObject> attachments) throws CoreException Sends an email to to, cc and bcc with subject subject and HTML message htmlmsg with attachments attachments using settings in configuration.- Parameters:
- configuration- the SMTP configuration that contains all information to send the email
- htmlmsg- the message body as html text this is what most of the recipients will see
- plainmsg- the message in plain text (this will be shown if the recipient doesn't accept html messages)
- subject- the subject of the email
- to- the recipients of the email message
- cc- the CC recipients
- bcc- the BCC recipients
- context- the context to use to check if the current user has the rights to access the attachments
- attachments- the attachments to send along with the email
- Throws:
- CoreException- if sending the email message by mail failed
 
- 
mailpublic static void mail(ISMTPConfiguration configuration, String htmlmsg, String plainmsg, String subject, String to) throws CoreException Sends an email to to with subject subject and message as html, the shown message will be htmlmsg. If the receipts don't support html messages the plainmsg will be shown.- Parameters:
- configuration- the SMTP configuration that contains all information to send the email
- htmlmsg- the message body as html text this is what most of the recipients will see
- plainmsg- the message in plain text (this will be shown if the recipient doesn't accept html messages)
- subject- the subject of the email
- to- the recipients of the email message
- Throws:
- CoreException- if sending the email message by mail failed
 
- 
mailpublic static void mail(ISMTPConfiguration configuration, String msg, String subject, String to, IContext context, IMendixObject attachment) throws CoreException Sends an email to to with subject subject and message msg with attachment attachment using settings in configuration.- Parameters:
- configuration- the SMTP configuration that contains all information to send the email
- msg- the message body to send
- subject- the subject of the email
- to- the recipients of the email message
- context- the context to use to check if the current user has the rights to access the attachments
- attachment- the attachment to send along with the email
- Throws:
- CoreException- if sending the email message by mail failed
 
- 
mailpublic static void mail(ISMTPConfiguration configuration, String htmlmsg, String plainmsg, String subject, String to, IContext context, IMendixObject attachment) throws CoreException Sends an email to to with subject subject and HTML message htmlmsg with attachment attachment using settings in configuration.- Parameters:
- configuration- the SMTP configuration that contains all information to send the email
- htmlmsg- the message body as html text this is what most of the recipients will see
- plainmsg- the message in plain text (this will be shown if the recipient doesn't accept html messages)
- subject- the subject of the email
- to- the recipients of the email message
- context- the context to use to check if the current user has the rights to access the attachments
- attachment- the attachment to send along with the email
- Throws:
- CoreException- if sending the email message by mail failed
 
 
-