Difference between revisions of "API:EPrints/Email"

From EPrints Documentation
Jump to: navigation, search
(New page: <!-- Pod2Wiki=_preamble_ This page has been automatically generated from the EPrints source. Any wiki changes made between the 'Pod2Wiki=*' and 'End of Pod2Wiki' comments will be lost. -...)
 
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
<!-- Pod2Wiki=_preamble_  
 
<!-- Pod2Wiki=_preamble_  
This page has been automatically generated from the EPrints source. Any wiki changes made between the 'Pod2Wiki=*' and 'End of Pod2Wiki' comments will be lost.
+
This page has been automatically generated from the EPrints 3.2 source. Any wiki changes made between the 'Pod2Wiki=*' and 'Edit below this comment' comments will be lost.
  -->{{Pod2Wiki}}{{API:Source|file=EPrints/Email.pm|package_name=EPrints::Email}}[[Category:API|Email]]<!-- End of Pod2Wiki -->
+
  -->{{API}}{{Pod2Wiki}}{{API:Source|file=perl_lib/EPrints/Email.pm|package_name=EPrints::Email}}[[Category:API|EMAIL]][[Category:API:EPrints/Email|EMAIL]]<div><!-- Edit below this comment -->
<!-- Pod2Wiki=head_name -->=NAME=
+
 
 +
 
 +
<!-- Pod2Wiki=_private_ --><!-- Pod2Wiki=head_name -->
 +
==NAME==
 
'''EPrints::Email''' - Email Utility functions for EPrints.
 
'''EPrints::Email''' - Email Utility functions for EPrints.
  
<!-- End of Pod2Wiki -->
+
<!-- Edit below this comment -->
<!-- Pod2Wiki=head_description -->=DESCRIPTION=
+
 
 +
 
 +
<!-- Pod2Wiki= -->
 +
<!-- Pod2Wiki=head_description -->
 +
==DESCRIPTION==
 
This package handles sending emails.
 
This package handles sending emails.
  
<!-- End of Pod2Wiki -->
+
* EPrints::Utils::send_mail( %properties )
<!-- Pod2Wiki=item_send_mail -->==send_mail==
+
: Sends an email.
 +
 
 +
: Required properties:
 +
 
 +
: session - the current session
 +
 
 +
: langid - the id of the language to send the email in.
  
  EPrints::Utils::send_mail( %properties )
+
: to_email, to_name - who to send it to
  
Sends an email.
+
: subject - the subject of the message (UTF-8 encoded string)
  
Required properties:
+
: message - the body of the message as a DOM tree
  
session - the current session
+
: optional properties:
  
langid - the id of the language to send the email in.
+
: from_email, from_name - who is sending the email (defaults to the archive admin)
  
to_email, to_name - who to send it to
+
: sig - the signature file as a DOM tree
  
subject - the subject of the message (UTF-8 encoded string)
+
: replyto_email, replyto_name
  
message - the body of the message as a DOM tree
+
: attach - ref to an array of filenames (with full paths) to attach to the message  
  
optional properties:
+
: to_list - ref to an array of additional email addresses to send the email to (note that to_email must be provided)
  
from_email, from_name - who is sending the email (defaults to the archive admin)
+
: cc_list - ref to an array of email addresses to CC the email to (note that to_email must be provided)
  
sig - the signature file as a DOM tree
+
: Returns true if mail sending (appears to have) succeeded. False otherwise.
  
replyto_email, replyto_name
+
: Uses the config. option "send_email" to send the mail, or if that's not defined sends the email via STMP.
  
attach - ref to an array of filenames (with full paths) to attach to the message
+
: names and the subject should be encoded as utf-8
  
Returns true if mail sending (appears to have) succeeded. False otherwise.
+
<pre></pre>
  
Uses the config. option "send_email" to send the mail, or if that's not defined sends the email via STMP.
+
<!-- Pod2Wiki=head_copyright -->
 +
==COPYRIGHT==
 +
: Copyright 2000-2011 University of Southampton.
  
names and the subject should be encoded as utf-8
+
: This file is part of EPrints http://www.eprints.org/.
  
 +
: EPrints is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
  
<!-- End of Pod2Wiki -->
+
: EPrints is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
<!-- Pod2Wiki=head_undocumented_methods -->=UNDOCUMENTED METHODS=
+
{{API:Undocumented Methods}}<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki=item_build_email -->==build_email==
+
  
<!-- End of Pod2Wiki -->
+
: You should have received a copy of the GNU Lesser General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.
<!-- Pod2Wiki=item_encode_mime_header -->==encode_mime_header==
+
  
<!-- End of Pod2Wiki -->
+
<!-- Edit below this comment -->
<!-- Pod2Wiki=item_send_mail_via_sendmail -->==send_mail_via_sendmail==
+
  
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_send_mail_via_smtp -->==send_mail_via_smtp==
 
  
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=_postamble_ --><!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki=_postamble_ -->
 +
<!-- Edit below this comment -->

Latest revision as of 09:56, 22 January 2013

EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects


API: Core API

Latest Source Code (3.3, 3.2) | Revision Log | Before editing this page please read Pod2Wiki


NAME

EPrints::Email - Email Utility functions for EPrints.


DESCRIPTION

This package handles sending emails.

  • EPrints::Utils::send_mail( %properties )
Sends an email.
Required properties:
session - the current session
langid - the id of the language to send the email in.
to_email, to_name - who to send it to
subject - the subject of the message (UTF-8 encoded string)
message - the body of the message as a DOM tree
optional properties:
from_email, from_name - who is sending the email (defaults to the archive admin)
sig - the signature file as a DOM tree
replyto_email, replyto_name
attach - ref to an array of filenames (with full paths) to attach to the message
to_list - ref to an array of additional email addresses to send the email to (note that to_email must be provided)
cc_list - ref to an array of email addresses to CC the email to (note that to_email must be provided)
Returns true if mail sending (appears to have) succeeded. False otherwise.
Uses the config. option "send_email" to send the mail, or if that's not defined sends the email via STMP.
names and the subject should be encoded as utf-8

COPYRIGHT

Copyright 2000-2011 University of Southampton.
This file is part of EPrints http://www.eprints.org/.
EPrints is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
EPrints is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with EPrints. If not, see http://www.gnu.org/licenses/.