SetSender

Description

Sets the specified sender’s email address and display name.

Applies to

MimeMessage object

Syntax

mimemessage.SetSender(string sender{, string sendername})

Argument

Description

mimemessage

A MimeMessage object identifying the email message in which you want to set the sender’s email address and display name.

sender

A string that contains the sender’s email address.

sendername (optional)

A string that contains the sender’s email display name.


Return value

Integer.

Returns 1 if it succeeds and -1 if the email name format is incorrect. If any argument's value is null, the method returns null.

Examples

The following example sets the sender’s email address.

lnv_SmtpClient.Message.SetSender("tester001.appeon@gmail.com")

The following example sets the sender’s email address and display name.

lnv_SmtpClient.Message.SetSender("tester001.appeon@gmail.com","Tester001")

See also

AddAttachment

AddBcc

AddCc

AddLinkedResource

AddRecipient

Reset

GetSender