NAME

RT::Action::SendEmail - An Action which users can use to send mail or can subclassed for more specialized mail sending behavior. RT::Action::AutoReply is a good example subclass.

SYNOPSIS

  require RT::Action::SendEmail;
  @ISA  = qw(RT::Action::SendEmail);

DESCRIPTION

Basically, you create another module RT::Action::YourAction which ISA RT::Action::SendEmail.

If you want to set the recipients of the mail to something other than the addresses mentioned in the To, Cc, Bcc and headers in the template, you should subclass RT::Action::SendEmail and override either the SetRecipients method or the SetTo, SetCc, etc methods (see the comments for the SetRecipients sub).

AUTHOR

Jesse Vincent <jesse@bestpractical.com> and Tobias Brox <tobix@cpan.org>

SEE ALSO

perl(1).

SetRTSpecialHeaders

This routine adds all the random headers that RT wants in a mail message that don't matter much to anybody else.

SetReferences # This routine will set the References: and In-Reply-To headers, # autopopulating it with all the correspondence on this ticket so # far. This should make RT responses threadable.

SetMessageID

Without this one, threading won't work very nice in email agents. Anyway, I'm not really sure it's that healthy if we need to send several separate/different emails about the same transaction.

SetReturnAddress is_comment => BOOLEAN

Calculate and set From and Reply-To headers based on the is_comment flag.

SetHeader FIELD, VALUE

Set the FIELD of the current MIME object into VALUE.

SetRecipients

Dummy method to be overriden by subclasses which want to set the recipients.

SetTo

Takes a string that is the addresses you want to send mail to

SetCc

Takes a string that is the addresses you want to Cc

SetBcc

Takes a string that is the addresses you want to Bcc

SetSubject

This routine sets the subject. it does not add the rt tag. that gets done elsewhere If $self->{'Subject'} is already defined, it uses that. otherwise, it tries to get the transaction's subject.

SetSubjectToken

This routine fixes the RT tag in the subject. It's unlikely that you want to overwrite this.

SetHeaderAsEncoding($field_name, $charset_encoding)

This routine converts the field into specified charset encoding.

MIMEEncodeString STRING ENCODING

Takes a string and a possible encoding and returns the string wrapped in MIME goo.