Sets the mail notification settings for the mail message.
Description
Remarque : This method is for Perl only. It is not
available for VBScript. This method became available in version 2003.06.15.
With
support for specifying a character set for email notification other
than the default UTF-8 setting, the SetMailNotificationSettings method
accepts a language setting optional argument to specify the character
set. If the additional element is present and is not "", it is used
as the enforced encoding for all outgoing email notifications.
For Windows,
the mail settings argument to this method can be in one of the following
forms:
- {"SMTP", "host", "defaultfrom", "name",
"1"}
- {"MAPI", "profile", "1"}
- {"MAPI", "profilealias", "1", "server"}
- {"POP3", "host", "username", "password"}
where 1 indicates that "send active" is True
for SMTP and MAPI protocols (not required by POP3).
The
string values in the configuration setting string are based on the
mail transport type (SMTP, MAPI, POP3).
- SMTP
- host - the host name (for example, mail.test.ibm.com).
- defaultfrom - an email address (for example,
admin@us.ibm.com).
- name - the name associated with the defaultfrom e-mail
address (for example, John Smith).
- 1 - indicates that "send active" is True for SMTP
protocol.
- MAPI
- profile - a profile file name (for example,
myprofile.ini).
- server - the mail server name or IP address
(for example, mail.test.ibm.com).
- profilealias - the profile alias name (for
example, cq_admin).
- 1 - indicates that "send active" is True for MAPI
protocol.
- POP
- host - the host name (for example, mail.test.ibm.com).
- user - a user name .
- password - the user's password.
Remarque : On UNIX systems
and Linux , the Perl CQMailMsg
object uses the sendmail program to send the email message. For this
to work properly, sendmail must be configured on the UNIX system and Linux client
machines.
Avertissement : La prise en charge de Rational ClearQuest Email 1.x et
de MAPI n'est plus assurée. For enhanced email support, use the EmailPlus
2.1 package. Pour plus d'informations, voir
Package EmailPlus.
Syntaxe
Perl
$MailMsg->SetMailNotificationSettings(config_info);
- Identificateur
- Description
- MailMsg
- A Mail Message object, representing the mail message
to be sent.
- config_info
- A reference to an array of strings, containing
the mail notification settings for the mail message.
- Valeur renvoyée
- Returns a Boolean True if the mail notification
settings have been successfully changed; False otherwise.
Exemple
Perl
use CQPerlExt;
my $cqmail = CQMailMsg::Build();
my @SMTPemailsettings = ('SMTP', 'mail.test.ibm.com', 'admin@us.ibm.com', 'John Smith', '1');
my $setmail_success = $cqmail->SetMailNotificationSettings(\@SMTPemailsettings);
if ($setmail_success) {
print "Email notification successfully set\n";
}
else {
print "Email notification NOT successfully set\n";
}
CQMailMsg::Unbuild($cqmail);