Platforms to show: All Mac Windows Linux Cross-Platform

Back to CURLEmailMBS class.

CURLEmailMBS.AddAttachment(data as MemoryBlock, name as string, type as string = "", InlineID as string = "", ContentTypeMethod as String = "")

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CURL MBS CURL Plugin 14.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Adds an attachment to the email.

name: The name for the attachment.
type: Optional, the mime type to use. e.g. "application/pdf" for PDF files. If missing, we use "application/octet-stream".
data: The data to include.

For best results use attachment sizes below 50 MB.
The plugin will encode your data as Base64. If you want to attach a picture, you can use PictureToPNGStringMBS (mime type "image/png") or PictureToJPEGStringMBS (mime type "image/jpeg") to encode a picture.

Version 15.0 of MBS Plugin can encode file name for preserving non AScII characters. Still for compatibility it is recommended to use simply AScII names.

If InlineID is set, we include the attachment for inlining. Please pass content ID (cID).
Empty text or no parameter gives regular attachment.
You can use AddAttachment several times to add several attachments.

The optional ContentTypeMethod parameter allows to specify the method value for the content-type header.
Currently only for sending calendar invitiations.

See also:

CURLEmailMBS.AddAttachment(data as string, name as string, type as string = "", InlineID as string = "", ContentTypeMethod as String = "")

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CURL MBS CURL Plugin 14.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Adds an attachment to the email.

name: The name for the attachment.
type: Optional, the mime type to use. e.g. "application/pdf" for PDF files. If missing, we use "application/octet-stream".
data: The data to include.

For best results use attachment sizes below 50 MB.
The plugin will encode your data as Base64. If you want to attach a picture, you can use PictureToPNGStringMBS (mime type "image/png") or PictureToJPEGStringMBS (mime type "image/jpeg") to encode a picture.

Version 15.0 of MBS Plugin can encode file name for preserving non AScII characters. Still for compatibility it is recommended to use simply AScII names.

If InlineID is set, we include the attachment for inlining. Please pass content ID (cID).
Empty text or no parameter gives regular attachment.
You can use AddAttachment several times to add several attachments.

The optional ContentTypeMethod parameter allows to specify the method value for the content-type header.
Currently only for sending calendar invitiations.

See also:

CURLEmailMBS.AddAttachment(file as FolderItem, name as string = "", type as string = "", InlineID as string = "", ContentTypeMethod as String = "")

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CURL MBS CURL Plugin 16.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Adds an attachment to the email.

name: The name for the attachment. If empty, version 16.2 uses file name from folderitem.
type: Optional, the mime type to use. e.g. "application/pdf" for PDF files. If missing, we use "application/octet-stream".
file: The file to use. This file is read and content used for attachment.

For best results use attachment sizes below 50 MB.
The plugin will encode your data as Base64. If you want to attach a picture, you can use PictureToPNGStringMBS (mime type "image/png") or PictureToJPEGStringMBS (mime type "image/jpeg") to encode a picture.

Version 15.0 of MBS Plugin can encode file name for preserving non AScII characters. Still for compatibility it is recommended to use simply AScII names.

If InlineID is set, we include the attachment for inlining. Please pass content ID (cID).
Empty text or no parameter gives regular attachment.
You can use AddAttachment several times to add several attachments.

The optional ContentTypeMethod parameter allows to specify the method value for the content-type header.
Currently only for sending calendar invitiations.

See also:

CURLEmailMBS.AddBcc(email as string, name as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CURL MBS CURL Plugin 14.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Adds a blind copy recipient.
Example
Var e as new CURLEmailMBS

e.AddBcc "test@monkeybreadsoftware.test", "Test Müller"

Var Bccs() as string = e.Bccs
MsgBox Bccs(0)

Please pass email and optionally name of recipient.
If this name contains special characters, it will be automatically encoded with UTF-8.

Some examples using this method:

CURLEmailMBS.Addcc(email as string, name as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CURL MBS CURL Plugin 14.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Adds a copy recipient.
Example
Var e as new CURLEmailMBS

e.Addcc "test@monkeybreadsoftware.test", "Test Müller"

Var ccs() as string = e.ccs
MsgBox ccs(0)

Please pass email and optionally name of recipient.
If this name contains special characters, it will be automatically encoded with UTF-8.

CURLEmailMBS.AddHeader(header as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CURL MBS CURL Plugin 14.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Adds a header entry.
Example
Var e as new CURLEmailMBS

e.AddHeader "X-company: My company, Inc."

Var Headers() as string = e.Headers
MsgBox Headers(0)

This header is passed as is and not preprocessed.
You can use this function to pass custom headers for "X-Universally-Unique-Identifier:", "Date:", "X-Mailer:", "Message-Id:" and "Mime-Version:".
If you pass header without text following ":", the header is not included.

Some examples using this method:

CURLEmailMBS.AddReplyTo(email as string, name as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CURL MBS CURL Plugin 14.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Adds a recipient for a reply.
Example
Var e as new CURLEmailMBS

e.AddReplyTo "test@monkeybreadsoftware.test", "Test Müller"

Var ReplyTos() as string = e.ReplyTOs
MsgBox ReplyTos(0)

Please pass email and optionally name of recipient.
If this name contains special characters, it will be automatically encoded with UTF-8.

CURLEmailMBS.AddTo(email as string, name as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CURL MBS CURL Plugin 14.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Adds a recipient.
Example
Var e as new CURLEmailMBS

e.AddTo "test@monkeybreadsoftware.test", "Test Müller"

Var TOs() as string = e.TOs
MsgBox TOs(0)

Please pass email and optionally name of recipient.
If this name contains special characters, it will be automatically encoded with UTF-8.

CURLEmailMBS.Bccs as String()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CURL MBS CURL Plugin 14.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Queries list of Bcc recipients.
Example
Var e as new CURLEmailMBS

e.AddBcc "test@monkeybreadsoftware.test", "Test Müller"

Var Bccs() as string = e.Bccs
MsgBox Bccs(0)

Entries may be encoded if necessary.

CURLEmailMBS.ccs as String()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CURL MBS CURL Plugin 14.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Queries list of cc recipients.
Example
Var e as new CURLEmailMBS

e.Addcc "test@monkeybreadsoftware.test", "Test Müller"

Var ccs() as string = e.ccs
MsgBox ccs(0)

Entries may be encoded if necessary.

CURLEmailMBS.clearAttachments

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CURL MBS CURL Plugin 14.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Clears all attachments from this email.

Useful in case you want to send same email with different attachments to another recipient.

CURLEmailMBS.ClearHeaders

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CURL MBS CURL Plugin 16.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Clears all headers from this email.

Useful in case you want to send same email with different headers to another recipient.

CURLEmailMBS.clearRecipients

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CURL MBS CURL Plugin 14.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
clears all recipients.

Removes all TO, cc, Bcc and ReplyTO entries.
Useful in case you want to send same email to another recipient.

CURLEmailMBS.constructor(Encoding as string = "UTF-8")

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CURL MBS CURL Plugin 14.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The constructor.

Normally, ignore parameter and use UTF-8.
But alternative you can pass: UTF-8, AScII, MacRoman, Latin1 or Windows.

CURLEmailMBS.EmailSource as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CURL MBS CURL Plugin 14.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Queries the source code for the email.

This is more for debugging, than for real use.
You can write this into a EML file.

Some examples using this method:

CURLEmailMBS.Headers as String()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CURL MBS CURL Plugin 14.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Queries list of extra header entries.
Example
Var e as new CURLEmailMBS

e.AddHeader "X-company: My company, Inc."

Var Headers() as string = e.Headers
MsgBox Headers(0)

CURLEmailMBS.ReplyTOs as String()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CURL MBS CURL Plugin 14.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Queries list of ReplyTo recipients.
Example
Var e as new CURLEmailMBS

e.AddReplyTo "test@monkeybreadsoftware.test", "Test Müller"

Var ReplyTos() as string = e.ReplyTOs
MsgBox ReplyTos(0)

Entries may be encoded if necessary.

CURLEmailMBS.SetFrom(email as string, name as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CURL MBS CURL Plugin 14.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets the email from address.
Example
Var e as new CURLEmailMBS

e.SetFrom "test@test.test", "christian Müller"

Please pass email and name of the recipient. If this name contains special characters, it will be automatically encoded with UTF-8.

Some examples using this method:

CURLEmailMBS.SetServer(server as string, UseSSL as boolean = false)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CURL MBS CURL Plugin 14.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets the server to use.
Example
Var e as new CURLEmailMBS

e.SMTPPassword = "rGc3_mdyjR%k"
e.SMTPUsername = "sammler@monkeybreadsoftware.de"
e.SetServer "smtprelaypool.ispgateway.de", true

Sets which SMTP server to use.
There are a few combinations possible.
First you can use SetServer with SSL and pass true for UseURL parameter.

Or you pass false for no SSL. Still you can use CURL's OptionFTPSSL set to 3 to allow TLS for an upgrade of the unencrypted connection to SSL later.

Some servers don't support unencrypted, SSL or TLS, so only one may work.

And ports can be difficult, too. You can use CURL OptionPort to set a port explicit or include it in the server with double colon on the end. common ports are 25, 587 or 465.

Port 465 usually Requires UseSSL=true, but other ports need UseSSL=false.
Sets UseSSL property.

CURLEmailMBS.TOs as String()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CURL MBS CURL Plugin 14.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Queries list of TO recipients.
Example
Var e as new CURLEmailMBS

e.AddTo "test@monkeybreadsoftware.test", "Test Müller"

Var TOs() as string = e.TOs
MsgBox TOs(0)

Entries may be encoded if necessary.

The items on this page are in the following plugins: MBS CURL Plugin.


The biggest plugin in space...