- SmartParseMIMEEntityFromScalar Message => SCALAR_REF [, Decode => BOOL, Exact => BOOL ] }
- ParseMIMEEntityFromScalar $message
- ParseMIMEEntityFromFilehandle *FH
- ParseCcAddressesFromHead HASHREF
- IsRTaddress ADDRESS
- CullRTAddresses ARRAY
- _SetupMIMEParser $parser
- ParseEmailAddress string
- CleanupAddresses ARRAY
RT::EmailParser - helper functions for parsing parts from incoming email messages
Returns a new RT::EmailParser object
Parse a message stored in a scalar from scalar_ref.
Parse a message from standard input
Takes either a scalar or a reference to a scalar which contains a stringified MIME message. Parses it.
Returns true if it wins. Returns false if it loses.
Parses a mime entity from a filehandle passed in as an argument
Parses a mime entity from a filename passed in as an argument
cleans up and postprocesses a newly parsed MIME Entity
Takes a hashref object containing QueueObj, Head and CurrentUser objects. Returns a list of all email addresses in the To and Cc headers b<except> the current Queue's email addresses, the CurrentUser's email address and anything that the RT->Config->Get('RTAddressRegexp') matches.
Takes a single parameter, an email address. Returns true if that address matches the
RTAddressRegexp config option. Returns false, otherwise.
Takes a single argument, an array of email addresses. Returns the same array with any IsRTAddress()es weeded out.
LookupExternalUserInfo is a site-definable method for synchronizing incoming users with an external data source. This routine takes a tuple of EmailAddress and FriendlyName EmailAddress is the user's email address, ususally taken from an email message's From: header. FriendlyName is a freeform string, ususally taken from the "comment" portion of an email message's From: header. It returns (FoundInExternalDatabase, ParamHash); FoundInExternalDatabase must be set to 1 before return if the user was found in the external database. ParamHash is a Perl parameter hash which can contain at least the following fields. These fields are used to populate RT's users database when the user is created. EmailAddress is the email address that RT should use for this user. Name is the 'Name' attribute RT should use for this user. 'Name' is used for things like access control and user lookups. RealName is what RT should display as the user's name when displaying 'friendly' names
Return the parsed head from this message
Return the parsed Entity from this message
A private instance method which sets up a mime parser to do its job
Returns a list of Email::Address objects Works around the bug that Email::Address 1.889 and earlier doesn't handle local-only email addresses (when users pass in just usernames on the RT system in fields that expect Email Addresses)
We don't handle the case of bob, email@example.com because we don't want to fail parsing bob, "Falcone, Fred" <firstname.lastname@example.org> The next release of Email::Address will have a new method we can use that removes the bandaid
Massages an array of Email::Address objects to make their email addresses more palatable.
Currently this strips off surrounding single quotes around
->address and modifies the Email::Address objects in-place.
Returns the list of objects for convienence in
Outlook 2007/2010 have a bug when you write an email with the html format. it will send a 'multipart/alternative' with both 'text/plain' and 'text/html' in it. it's cool to have a 'text/plain' part, but the problem is the part is not so right: all the "\n" in your main message will become "\n\n" :/
this method will fix this bug, i.e. replaces "\n\n" to "\n". return 1 if it does find the problem in the entity and get it fixed.
Try to determine if the current email may have come from MS Outlook or gone through Exchange, and therefore may have extra newlines added.← Back to index