Difference between revisions of "Email.pl"

From EPrints Documentation
Jump to: navigation, search
(Added page about config file)
 
(Added actually file name in bold.)
 
Line 2: Line 2:
 
{{cfgd}}
 
{{cfgd}}
  
This file includes configuration for how email that EPrints needs to send should be sent.  By default this uses the ''send_mail_via_smtp'' function with the following line:
+
'''email.pl''' includes configuration for how email that EPrints needs to send should be sent.  By default this uses the ''send_mail_via_smtp'' function with the following line:
 
  $c->{send_email} = \&EPrints::Email::send_mail_via_smtp;
 
  $c->{send_email} = \&EPrints::Email::send_mail_via_smtp;
 
This could be changed to the ''send_mail_via_sendmail'' function of bespoke function of your own.  If you define you own function it will be passed the following parameters:
 
This could be changed to the ''send_mail_via_sendmail'' function of bespoke function of your own.  If you define you own function it will be passed the following parameters:

Latest revision as of 12:23, 27 January 2022

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


Back to cfg.d

email.pl includes configuration for how email that EPrints needs to send should be sent. By default this uses the send_mail_via_smtp function with the following line:

$c->{send_email} = \&EPrints::Email::send_mail_via_smtp;

This could be changed to the send_mail_via_sendmail function of bespoke function of your own. If you define you own function it will be passed the following parameters:

  • $repository - The Repository object.
  • $langid - The language ID, (e.g. en) to be used when transcribing EPC phrases.
  • $name - The name of the person to which the email is to be sent.
  • $address - The email address to which the email is to be sent.
  • $subject - The subject line of the email.
  • $body - The main body of the email.
  • $sig - The signature to be added the end of the email's main body.
  • $replyto - The reply to email address.
  • $replytoname - The name to associate with the reply to email address.