Send Mail

API Type

Web Services

Description

Sends an email through AgilePoint Server.

Syntax

public virtual void SendMail(String To, String CC, String Subject, String Body)

Parameters

Name Description

To

Definition:
Specifies the To portion of an email.
Type
string
Allowed Values:
A string that includes one or more email addresses in SMTP format.

CC

Definition:
Specifies the CC portion of an email.
Type
string
Allowed Values:
A string that includes one or more email addresses in SMTP format.

Subject

Definition:
The subject of an email.
Type
string
Allowed Values:
A single line of text.

Body

Definition:
Specifies the body portion of an email.
Type
string
Allowed Values:
Free text.

Output

None.

Example

//Sample for using Workflow.SendMail
IWFWorkflowService svc = GetWorkflowService();

try
	{               
    // email recipients
    string To = "bill@tusca.com";
    
    // CC
    string CC = "bob@tusca.com";
    
    //Subject of the Mail
    string Subject = "This is email Subject";
    
    //Body of the Mail
    string Body = "This email Body";
    svc.SendMail(To, CC, Subject, Body);
	}

catch (Exception ex)
	{
    Console.WriteLine("Failed! " + ShUtil.GetSoapMessage(ex));
	}

Supported Versions

3.2.0.4 and higher