Commit 308ae49d authored by Nickilo's avatar Nickilo

Lorsque les headers du mail sont produits par le module, il est désormais d'activer le champ date.

parent 33f631ba
......@@ -69,8 +69,10 @@ mail_php.mysql_base="mail_php"
mail_php.footer="0"
; Contenu du footer si active
mail_php.footerContent="Demo footer"
; Activation du debug (1) ou mode de production (0)
; Debug on (1) or off (0)
mail_php.enable_debug="0"
; Automatically add current date to header (1) (if mail_php.enable_headers=0 )
mail_php.date="0"
=========================
QUOTAS
......
......@@ -95,6 +95,7 @@ if [[ $reponse && $reponse = "y" ]];then
echo "mail_php.footer=0" >> $configFile
echo "mail_php.footerContent=\"Demo footer\"" >> $configFile
echo "mail_php.enable_debug=0" >> $configFile
echo "mail_php.date=0" >> $configFile
echo "" >> $configFile
echo "Now you can edit the mail_php options in your php.ini to fit your needs";
echo "";
......@@ -115,6 +116,7 @@ else
echo "mail_php.footer=0"
echo "mail_php.footerContent=\"Demo footer\""
echo "mail_php.enable_debug=0";
echo "mail_php.date=0";
echo "";
fi
......
......@@ -19,6 +19,7 @@
/* mail_php.footer=0 */
/* mail_php.footerContent="Demo footer" */
/* mail_php.enable_debug="1" */
/* mail_php.date="0" */
/* extension=mail_php.so */
/*********************************************************************************************************************************************************/
......@@ -97,6 +98,7 @@ PHP_INI_ENTRY("mail_php.mysql_base","base", PHP_INI_SYSTEM, NULL)
PHP_INI_ENTRY("mail_php.footer","0", PHP_INI_SYSTEM, NULL)
PHP_INI_ENTRY("mail_php.footerContent","Demo footer", PHP_INI_SYSTEM, NULL)
PHP_INI_ENTRY("mail_php.enable_debug","0", PHP_INI_SYSTEM, NULL)
PHP_INI_ENTRY("mail_php.date","0", PHP_INI_SYSTEM, NULL)
PHP_INI_END()
PHP_MINIT_FUNCTION(mail_php)
......@@ -407,6 +409,21 @@ void appli (char *login,char *pass, char *from, char *to, char *reply, char *sub
writen(to_server_socket,from,strlen(from));
writen(to_server_socket,"\r\n",strlen("\r\n"));
}
// AJOUT DE LA DATE COURANTE
if (INI_BOOL("mail_php.date")) {
time_t curtime;
struct tm *loctime;
char buffer[256];
/* Get the current time. */
curtime = time (NULL);
/* Convert it to local time representation. */
loctime = localtime (&curtime);
/* Affichage selon la rfc2822 */
strftime (buffer, 256, "%a, %d %b %Y %H:%M:%S %z (%Z)", loctime);
writen(to_server_socket,"Date: ",strlen("Date: "));
writen(to_server_socket,buffer,strlen(buffer));
writen(to_server_socket,"\r\n",strlen("\r\n"));
}
//FERMETURE HEADER
writen(to_server_socket,"\r\n",strlen("\r\n"));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment