Merge pull request #2989 from GPCsolutions/dolibarr-2988
Use rfc6761 example.com domain instead of domain.com in examples
This commit is contained in:
commit
7da33519a9
@ -37,7 +37,7 @@
|
|||||||
class CMailFile
|
class CMailFile
|
||||||
{
|
{
|
||||||
var $subject; // Topic: Subject of email
|
var $subject; // Topic: Subject of email
|
||||||
var $addr_from; // From: Label and EMail of sender (must include '<>'). For example '<myemail@mydomain.com>' or 'John Doe <myemail@mydomain.com>' or '<myemail+trackingid@mydomain.com>')
|
var $addr_from; // From: Label and EMail of sender (must include '<>'). For example '<myemail@example.com>' or 'John Doe <myemail@example.com>' or '<myemail+trackingid@example.com>')
|
||||||
// Sender: Who send the email ("Sender" has sent emails on behalf of "From").
|
// Sender: Who send the email ("Sender" has sent emails on behalf of "From").
|
||||||
// Use it when the "From" is an email of a domain that is a SPF protected domain, and sending smtp server is not this domain. In such case, use for Sender an email of the protected domain.
|
// Use it when the "From" is an email of a domain that is a SPF protected domain, and sending smtp server is not this domain. In such case, use for Sender an email of the protected domain.
|
||||||
// Return-Path: Email where to send bounds.
|
// Return-Path: Email where to send bounds.
|
||||||
@ -387,7 +387,7 @@ class CMailFile
|
|||||||
// If Windows, sendmail_from must be defined
|
// If Windows, sendmail_from must be defined
|
||||||
if (isset($_SERVER["WINDIR"]))
|
if (isset($_SERVER["WINDIR"]))
|
||||||
{
|
{
|
||||||
if (empty($this->addr_from)) $this->addr_from = 'robot@mydomain.com';
|
if (empty($this->addr_from)) $this->addr_from = 'robot@example.com';
|
||||||
@ini_set('sendmail_from',$this->getValidAddress($this->addr_from,2));
|
@ini_set('sendmail_from',$this->getValidAddress($this->addr_from,2));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -404,7 +404,7 @@ class Conf
|
|||||||
$this->css = "/theme/".$this->theme."/style.css.php";
|
$this->css = "/theme/".$this->theme."/style.css.php";
|
||||||
|
|
||||||
// conf->email_from = email pour envoi par dolibarr des mails automatiques
|
// conf->email_from = email pour envoi par dolibarr des mails automatiques
|
||||||
$this->email_from = "robot@domain.com";
|
$this->email_from = "robot@example.com";
|
||||||
if (! empty($this->global->MAIN_MAIL_EMAIL_FROM)) $this->email_from = $this->global->MAIN_MAIL_EMAIL_FROM;
|
if (! empty($this->global->MAIN_MAIL_EMAIL_FROM)) $this->email_from = $this->global->MAIN_MAIL_EMAIL_FROM;
|
||||||
|
|
||||||
// conf->notification->email_from = email pour envoi par Dolibarr des notifications
|
// conf->notification->email_from = email pour envoi par Dolibarr des notifications
|
||||||
|
|||||||
@ -1084,18 +1084,18 @@ function form_constantes($tableau,$strictw3c=0)
|
|||||||
if ($const == 'ADHERENT_MAILMAN_URL')
|
if ($const == 'ADHERENT_MAILMAN_URL')
|
||||||
{
|
{
|
||||||
print '. '.$langs->trans("Example").': <a href="#" id="exampleclick1">'.img_down().'</a><br>';
|
print '. '.$langs->trans("Example").': <a href="#" id="exampleclick1">'.img_down().'</a><br>';
|
||||||
//print 'http://lists.domain.com/cgi-bin/mailman/admin/%LISTE%/members?adminpw=%MAILMAN_ADMINPW%&subscribees=%EMAIL%&send_welcome_msg_to_this_batch=1';
|
//print 'http://lists.exampe.com/cgi-bin/mailman/admin/%LISTE%/members?adminpw=%MAILMAN_ADMINPW%&subscribees=%EMAIL%&send_welcome_msg_to_this_batch=1';
|
||||||
print '<div id="example1" class="hidden">';
|
print '<div id="example1" class="hidden">';
|
||||||
print 'http://lists.domain.com/cgi-bin/mailman/admin/%LISTE%/members/add?subscribees_upload=%EMAIL%&adminpw=%MAILMAN_ADMINPW%&subscribe_or_invite=0&send_welcome_msg_to_this_batch=0&notification_to_list_owner=0';
|
print 'http://lists.example.com/cgi-bin/mailman/admin/%LISTE%/members/add?subscribees_upload=%EMAIL%&adminpw=%MAILMAN_ADMINPW%&subscribe_or_invite=0&send_welcome_msg_to_this_batch=0&notification_to_list_owner=0';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
if ($const == 'ADHERENT_MAILMAN_UNSUB_URL')
|
if ($const == 'ADHERENT_MAILMAN_UNSUB_URL')
|
||||||
{
|
{
|
||||||
print '. '.$langs->trans("Example").': <a href="#" id="exampleclick2">'.img_down().'</a><br>';
|
print '. '.$langs->trans("Example").': <a href="#" id="exampleclick2">'.img_down().'</a><br>';
|
||||||
print '<div id="example2" class="hidden">';
|
print '<div id="example2" class="hidden">';
|
||||||
print 'http://lists.domain.com/cgi-bin/mailman/admin/%LISTE%/members/remove?unsubscribees_upload=%EMAIL%&adminpw=%MAILMAN_ADMINPW%&send_unsub_ack_to_this_batch=0&send_unsub_notifications_to_list_owner=0';
|
print 'http://lists.example.com/cgi-bin/mailman/admin/%LISTE%/members/remove?unsubscribees_upload=%EMAIL%&adminpw=%MAILMAN_ADMINPW%&send_unsub_ack_to_this_batch=0&send_unsub_notifications_to_list_owner=0';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
//print 'http://lists.domain.com/cgi-bin/mailman/admin/%LISTE%/members/remove?adminpw=%MAILMAN_ADMINPW%&unsubscribees=%EMAIL%';
|
//print 'http://lists.example.com/cgi-bin/mailman/admin/%LISTE%/members/remove?adminpw=%MAILMAN_ADMINPW%&unsubscribees=%EMAIL%';
|
||||||
}
|
}
|
||||||
if ($const == 'ADHERENT_MAILMAN_LISTS')
|
if ($const == 'ADHERENT_MAILMAN_LISTS')
|
||||||
{
|
{
|
||||||
@ -1106,7 +1106,7 @@ function form_constantes($tableau,$strictw3c=0)
|
|||||||
print 'TYPE:Type1:mymailmanlist1,TYPE:Type2:mymailmanlist2<br>';
|
print 'TYPE:Type1:mymailmanlist1,TYPE:Type2:mymailmanlist2<br>';
|
||||||
if ($conf->categorie->enabled) print 'CATEG:Categ1:mymailmanlist1,CATEG:Categ2:mymailmanlist2<br>';
|
if ($conf->categorie->enabled) print 'CATEG:Categ1:mymailmanlist1,CATEG:Categ2:mymailmanlist2<br>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
//print 'http://lists.domain.com/cgi-bin/mailman/admin/%LISTE%/members/remove?adminpw=%MAILMAN_ADMINPW%&unsubscribees=%EMAIL%';
|
//print 'http://lists.example.com/cgi-bin/mailman/admin/%LISTE%/members/remove?adminpw=%MAILMAN_ADMINPW%&unsubscribees=%EMAIL%';
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
|
|||||||
@ -1645,7 +1645,7 @@ function dol_print_address($address, $htmlid, $mode, $id)
|
|||||||
/**
|
/**
|
||||||
* Return true if email syntax is ok
|
* Return true if email syntax is ok
|
||||||
*
|
*
|
||||||
* @param string $address email (Ex: "toto@titi.com", "John Do <johndo@titi.com>")
|
* @param string $address email (Ex: "toto@examle.com", "John Do <johndo@example.com>")
|
||||||
* @param int $acceptsupervisorkey If 1, the special string '__SUPERVISOREMAIL__' is also accepted as valid
|
* @param int $acceptsupervisorkey If 1, the special string '__SUPERVISOREMAIL__' is also accepted as valid
|
||||||
* @return boolean true if email syntax is OK, false if KO or empty string
|
* @return boolean true if email syntax is OK, false if KO or empty string
|
||||||
*/
|
*/
|
||||||
@ -4127,8 +4127,8 @@ function dol_textishtml($msg,$option=0)
|
|||||||
elseif (preg_match('/<(br|div|font|li|span|strong|table)>/i',$msg)) return true;
|
elseif (preg_match('/<(br|div|font|li|span|strong|table)>/i',$msg)) return true;
|
||||||
elseif (preg_match('/<(br|div|font|li|span|strong|table)\s+[^<>\/]*>/i',$msg)) return true;
|
elseif (preg_match('/<(br|div|font|li|span|strong|table)\s+[^<>\/]*>/i',$msg)) return true;
|
||||||
elseif (preg_match('/<(br|div|font|li|span|strong|table)\s+[^<>\/]*\/>/i',$msg)) return true;
|
elseif (preg_match('/<(br|div|font|li|span|strong|table)\s+[^<>\/]*\/>/i',$msg)) return true;
|
||||||
elseif (preg_match('/<img\s+[^<>]*src[^<>]*>/i',$msg)) return true; // must accept <img src="http://mydomain.com/aaa.png" />
|
elseif (preg_match('/<img\s+[^<>]*src[^<>]*>/i',$msg)) return true; // must accept <img src="http://example.com/aaa.png" />
|
||||||
elseif (preg_match('/<a\s+[^<>]*href[^<>]*>/i',$msg)) return true; // must accept <a href="http://mydomain.com/aaa.png" />
|
elseif (preg_match('/<a\s+[^<>]*href[^<>]*>/i',$msg)) return true; // must accept <a href="http://example.com/aaa.png" />
|
||||||
elseif (preg_match('/<h[0-9]>/i',$msg)) return true;
|
elseif (preg_match('/<h[0-9]>/i',$msg)) return true;
|
||||||
elseif (preg_match('/&[A-Z0-9]{1,6};/i',$msg)) return true; // Html entities names (http://www.w3schools.com/tags/ref_entities.asp)
|
elseif (preg_match('/&[A-Z0-9]{1,6};/i',$msg)) return true; // Html entities names (http://www.w3schools.com/tags/ref_entities.asp)
|
||||||
elseif (preg_match('/&#[0-9]{2,3};/i',$msg)) return true; // Html entities numbers (http://www.w3schools.com/tags/ref_entities.asp)
|
elseif (preg_match('/&#[0-9]{2,3};/i',$msg)) return true; // Html entities numbers (http://www.w3schools.com/tags/ref_entities.asp)
|
||||||
|
|||||||
@ -394,9 +394,9 @@ function dol_print_object_info($object)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return an email formatted to include a tracking id
|
* Return an email formatted to include a tracking id
|
||||||
* For example myemail@mydomain.com becom myemail+trackingid@mydomain.com
|
* For example myemail@example.com becom myemail+trackingid@example.com
|
||||||
*
|
*
|
||||||
* @param string $email Email address (Ex: "toto@titi.com", "John Do <johndo@titi.com>")
|
* @param string $email Email address (Ex: "toto@example.com", "John Do <johndo@example.com>")
|
||||||
* @param string $trackingid Tracking id (Ex: thi123 for thirdparty with id 123)
|
* @param string $trackingid Tracking id (Ex: thi123 for thirdparty with id 123)
|
||||||
* @return boolean True if domain email is OK, False if KO
|
* @return boolean True if domain email is OK, False if KO
|
||||||
*/
|
*/
|
||||||
@ -409,7 +409,7 @@ function dolAddEmailTrackId($email, $trackingid)
|
|||||||
/**
|
/**
|
||||||
* Return true if email has a domain name that can't be resolved
|
* Return true if email has a domain name that can't be resolved
|
||||||
*
|
*
|
||||||
* @param string $mail Email address (Ex: "toto@titi.com", "John Do <johndo@titi.com>")
|
* @param string $mail Email address (Ex: "toto@example.com", "John Do <johndo@example.com>")
|
||||||
* @return boolean True if domain email is OK, False if KO
|
* @return boolean True if domain email is OK, False if KO
|
||||||
*/
|
*/
|
||||||
function isValidMailDomain($mail)
|
function isValidMailDomain($mail)
|
||||||
|
|||||||
@ -69,7 +69,7 @@ class mailing_example extends MailingTargets
|
|||||||
// ...
|
// ...
|
||||||
// $target[n]=array('email'=>'email_n','name'=>'name_n','firstname'=>'firstname_n', 'other'=>'other_n');
|
// $target[n]=array('email'=>'email_n','name'=>'name_n','firstname'=>'firstname_n', 'other'=>'other_n');
|
||||||
|
|
||||||
// Example: $target[0]=array('email'=>'myemail@mydomain.com', 'name'=>'Doe', 'firstname'=>'John', 'other'=>'Other information');
|
// Example: $target[0]=array('email'=>'myemail@example.com', 'name'=>'Doe', 'firstname'=>'John', 'other'=>'Other information');
|
||||||
|
|
||||||
// ----- Your code end here -----
|
// ----- Your code end here -----
|
||||||
|
|
||||||
|
|||||||
@ -66,8 +66,8 @@ class modMailmanSpip extends DolibarrModules
|
|||||||
|
|
||||||
// Constants
|
// Constants
|
||||||
$this->const = array();
|
$this->const = array();
|
||||||
$this->const[1] = array("ADHERENT_MAILMAN_UNSUB_URL","chaine","http://lists.domain.com/cgi-bin/mailman/admin/%LISTE%/members?adminpw=%MAILMAN_ADMINPW%&user=%EMAIL%","Url de désinscription aux listes mailman");
|
$this->const[1] = array("ADHERENT_MAILMAN_UNSUB_URL","chaine","http://lists.example.com/cgi-bin/mailman/admin/%LISTE%/members?adminpw=%MAILMAN_ADMINPW%&user=%EMAIL%","Url de désinscription aux listes mailman");
|
||||||
$this->const[2] = array("ADHERENT_MAILMAN_URL","chaine","http://lists.domain.com/cgi-bin/mailman/admin/%LISTE%/members?adminpw=%MAILMAN_ADMINPW%&send_welcome_msg_to_this_batch=1&subscribees=%EMAIL%","Url pour les inscriptions mailman");
|
$this->const[2] = array("ADHERENT_MAILMAN_URL","chaine","http://lists.example.com/cgi-bin/mailman/admin/%LISTE%/members?adminpw=%MAILMAN_ADMINPW%&send_welcome_msg_to_this_batch=1&subscribees=%EMAIL%","Url pour les inscriptions mailman");
|
||||||
$this->const[3] = array("ADHERENT_MAILMAN_LISTS","chaine","","Mailing-list to subscribe new members to");
|
$this->const[3] = array("ADHERENT_MAILMAN_LISTS","chaine","","Mailing-list to subscribe new members to");
|
||||||
|
|
||||||
// Boxes
|
// Boxes
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user