From 8838b30bde9771aec64facd9c61cd53d4dcfc3a0 Mon Sep 17 00:00:00 2001 From: Rainer Rillke Date: Fri, 17 Oct 2014 02:58:10 +0200 Subject: Accept some new gTLD e-Mail addresses by allowing longer TLDs (up to 63 characters, which is the DN maximum: https://tools.ietf.org/html/rfc1034): "Each node has a label, which is zero to 63 octets in length." For an up-to-date-length, see http://stackoverflow.com/a/22038535 --- inc/mail.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc/mail.php') diff --git a/inc/mail.php b/inc/mail.php index 9994ac63e..9f1b1f3d6 100644 --- a/inc/mail.php +++ b/inc/mail.php @@ -27,7 +27,7 @@ if(!defined('MAILHEADER_EOL')) define('MAILHEADER_EOL',"\n"); * Check if a given mail address is valid */ if (!defined('RFC2822_ATEXT')) define('RFC2822_ATEXT',"0-9a-zA-Z!#$%&'*+/=?^_`{|}~-"); -if (!defined('PREG_PATTERN_VALID_EMAIL')) define('PREG_PATTERN_VALID_EMAIL', '['.RFC2822_ATEXT.']+(?:\.['.RFC2822_ATEXT.']+)*@(?i:[0-9a-z][0-9a-z-]*\.)+(?i:[a-z]{2,4}|museum|travel)'); +if (!defined('PREG_PATTERN_VALID_EMAIL')) define('PREG_PATTERN_VALID_EMAIL', '['.RFC2822_ATEXT.']+(?:\.['.RFC2822_ATEXT.']+)*@(?i:[0-9a-z][0-9a-z-]*\.)+(?i:[a-z]{2,63})'); /** * Prepare mailfrom replacement patterns -- cgit v1.2.3 From 0a71e551221e2019670f92b416f0b42cd111618b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Gro=C3=9Fe?= Date: Thu, 9 Apr 2015 13:19:12 +0200 Subject: Add deprecated tag to mail_send, _mail_send_action, mail_encode_address These functions are already deprecated and replaced by the Mailer:: class. The deprecated tag was simply missing. --- inc/mail.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'inc/mail.php') diff --git a/inc/mail.php b/inc/mail.php index 9f1b1f3d6..e4d06fd86 100644 --- a/inc/mail.php +++ b/inc/mail.php @@ -96,15 +96,23 @@ function mail_setup(){ * * @author Andreas Gohr * @see mail() + * + * @deprecated User the Mailer:: class instead */ function mail_send($to, $subject, $body, $from='', $cc='', $bcc='', $headers=null, $params=null){ - + dbg_deprecated('class Mailer::'); $message = compact('to','subject','body','from','cc','bcc','headers','params'); return trigger_event('MAIL_MESSAGE_SEND',$message,'_mail_send_action'); } +/** + * @param $data + * @return bool + * + * @deprecated User the Mailer:: class instead + */ function _mail_send_action($data) { - + dbg_deprecated('class Mailer::'); // retrieve parameters from event data, $to, $subject, $body, $from, $cc, $bcc, $headers, $params $to = $data['to']; $subject = $data['subject']; @@ -177,8 +185,11 @@ function _mail_send_action($data) { * @param string $string Multiple adresses separated by commas * @param string $header Name of the header (To,Bcc,Cc,...) * @param boolean $names Allow named Recipients? + * + * @deprecated User the Mailer:: class instead */ function mail_encode_address($string,$header='',$names=true){ + dbg_deprecated('class Mailer::'); $headers = ''; $parts = explode(',',$string); foreach ($parts as $part){ -- cgit v1.2.3