Send Mail (Extended Method)

API Type

Web Services

Description

Sends an email through AgilePoint Server. The extended method enables you to send attachments.

Syntax

public virtual void SendMailEx(String From, String To, String CC, String Subject, String Body , String Attachments)

Parameters

Name Description

From

Function:
Specifies the From portion of an email.
Type
string
Accepted Values:
A string that includes one or more email addresses in SMTP format.

To

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

CC

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

Subject

Function:
The subject of an email.
Type
string
Accepted Values:
One line of text that can have spaces.

Attachments

Function:
File attachments included with the email.
Type
string
Accepted Values:
A valid path and file name on the AgilePoint Server.

This parameter must use a file path from the file system (for example, C:\file.txt) on the machine where AgilePoint Server is installed.

If there is no attachment, you can pass null or String.Empty.

Output

None.

Example

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

try
	{
    string From = "john@tusca.com"; // or <Full Name>"email address"
    string To = "bill@tusca.com";
    string CC = "bob@tusca.com";
    string Subject = "Mail Subject";
    string Body = "Mail Body";
    string Attachments = "c:\\Temp\\Tempdoc.doc";
 
    //Send Mail
    svc.SendMailEx(From, To, CC, Subject, Body, Attachments);
	}

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

Supported Versions

4.6 and higher

Code Examples in the AgilePoint NX Documentation

The AgilePoint NX Product Documentation is intended as a basic reference to help you understand how to complete basic coding tasks, such as make API or JavaScript method calls. Code examples that show specific use cases, the solutions to specific business problems, or detailed implementation scenarios are outside the scope of the AgilePoint NX Product Documentation. For specific and/or advanced types of examples that may better meet your requirements, AgilePoint provides several resources:

  • AgilePoint Community Forums - A free, AgilePoint-moderated, crowd-sourcing user forum where you can ask questions about specific techniques, the solutions to use cases, workarounds, or other topics that may not be covered in the Product Documentation.
  • Professional Services - If you can not find the information you need for your specific business problem, mentoring is available through AgilePoint Professional Services.
  • Personalized Training - AgilePoint can provide personalized training for your organization. To request personalized training, contact AgilePoint Sales.