| | | |  |  | |  |
21.08.2004, 13:52
|
#1 (permalink)
| | Junior Mamber
Join Date: Aug 2004
Posts: 28
| let PMS 2 send an email when sending a new message Ciao ragazzi, stamattina mi son sentito operativo ed ho scritto quattro righe che ti avvertono quando ti arriva un messaggio privato, scriverò in inglese così possono leggere tutti
Follow this simple steps to send an email message when a private message is posted with pms2 (pms II)
open: /components/com_pms/new.php
find: PHP Code: $send = "INSERT INTO #__pms (id,groupname,username,whofrom,date,time,readstate,subject,message) VALUES ('','','$_POST[recip]','$my->username','$date','$time','','$_POST[newsub]','$_POST[newmsg]')"; $database->setQuery($send); $result = $database->query();
after this, add: PHP Code: ### send email notify to recipient (by tassoman.com) $sqlEmailRecipient = "SELECT name, email FROM #__users where username='$_POST[recip]'"; $database->setQuery($sqlEmailRecipient); $rows = $database->loadObjectList(); $recipientName = $rows[0]->name; $recipientEmail = $rows[0]->email; mail( $recipientEmail, _PMS_MSG_NOTIFY_SUBJ, _PMS_MSG_NOTIFY_BODY, "From: Cellu.org <info@cellu.org>\r\nReply-To: \r\n"); ### end sends email notify
Edit /components/com_pms/language/yourlang.php
where you want, add: PHP Code: DEFINE('_PMS_MSG_NOTIFY_SUBJ','Hai un nuovo messaggio su Cellu.org!'); DEFINE('_PMS_MSG_NOTIFY_BODY','Ciao, $recipientName\n\n hai un nuovo messaggio privato, scritto per te da un utente di Cellu.org!\n\nClicca il link sottostante per leggere il messaggio privato:\n http://$_SERVER[SERVER_NAME]/component/option,com_pms/page,inbox\n\nhttp://www.cellu.org - La community per gli appassionati di telefonia mobile.');
And customize your email's content. 
Last edited by tassoman; 23.08.2004 at 11:50.
Reason: there was a typo! :P
|
| |
21.08.2004, 14:07
|
#2 (permalink)
| | Mamber
Join Date: Jul 2004
Posts: 65
| Re: let PMS 2 send an email when sending a new message Complimenti
bel lavoro ti ammiro un sacco  |
| |
21.08.2004, 14:15
|
#3 (permalink)
| | Junior Mamber
Join Date: Aug 2004
Posts: 28
| Re: let PMS 2 send an email when sending a new message Basta applicarsi!
Sto cercando di spedir mail anche quando si fa reply, ma mi sono incartato perchè voglio aggiungere i:
>
>
>
>
>
nella textarea di risposta...  |
| |
21.08.2004, 16:14
|
#4 (permalink)
| | Mamber
Join Date: May 2004 Location: Singapore
Posts: 101
| Re: let PMS 2 send an email when sending a new message Quote: |
Originally Posted by tassoman Ciao ragazzi, stamattina mi son sentito operativo ed ho scritto quattro righe che ti avvertono quando ti arriva un messaggio privato, scriverò in inglese così possono leggere tutti
Follow this simple steps to send an email message when a private message is posted with pms2 (pms II)
open: /components/com_pms/new.php
find: PHP Code: $send = "INSERT INTO #__pms (id,groupname,username,whofrom,date,time,readstate,subject,message) VALUES ('','','$_POST[recip]','$my->username','$date','$time','','$_POST[newsub]','$_POST[newmsg]')";
$database->setQuery($send);
$result = $database->query();
after this, add: PHP Code: ### send email notify to recipient (by tassoman.com)
$sqlEmailRecipient = "SELECT name, email FROM #__users where username='$_POST[recip]'";
$database->setQuery($sqlEmailRecipient);
$rows = $database->loadObjectList();
$recipientName = $rows[0]->name;
$recipientEmail = $rows[0]->email;
mail( $recipientEmail, _PMS_MSG_NOTIFY_SUBJ, _PMS_MSG_NOTIFY_BODY, "From: Cellu.org <info@cellu.org>\r\nReply-To: \r\n");
### end sends email notify
Edit /components/com_pms/language/yourlang.php
where you want, add: PHP Code: DEFINE('_PMS_MSG_NOTIFY_SUBJ','Hai un nuovo messaggio su Cellu.org!');
DEFINE('_PMS_MSG_NOTIFY_SUBJ','Ciao, $recipientName\n\n hai un nuovo messaggio privato, scritto per te da un utente di Cellu.org!\n\nClicca il link sottostante per leggere il messaggio privato:\n http://$_SERVER[SERVER_NAME]/component/option,com_pms/page,inbox\n\nhttp://www.cellu.org - La community per gli appassionati di telefonia mobile.');
And customize your email's content.  | Hi,
Care to translate the code to English? Thanks  |
| |
21.08.2004, 16:23
|
#5 (permalink)
| | Junior Mamber
Join Date: Aug 2004
Posts: 28
| Re: let PMS 2 send an email when sending a new message DEFINE('_PMS_MSG_NOTIFY_SUBJ','You have got a new private message on www.yoursite.com!'); DEFINE('_PMS_MSG_NOTIFY_SUBJ','Hi, $recipientName\n\n you have got a new message, written for you by an user of: www.yoursite.com!\n\nClicl the link to read it:\n http://$_SERVER[SERVER_NAME]/component/option,com_pms/page,inbox\n\nhttp://www.cellu.org - La community per gli appassionati di telefonia mobile.');
Should be something like this...  |
| |
21.08.2004, 17:10
|
#6 (permalink)
| | Mamber
Join Date: May 2004 Location: Singapore
Posts: 101
| Re: let PMS 2 send an email when sending a new message okie dokie.. thanks  |
| |
22.08.2004, 22:07
|
#7 (permalink)
| | Expert Mamber
Join Date: May 2004
Posts: 341
| Re: let PMS 2 send an email when sending a new message Direi un bel lavoro, importante!
Grazie!
Sono tornato!
Elwood
__________________ "Im Nucleo war Ich bloss der Buchhalter des Todes" |
| |
22.08.2004, 22:21
|
#8 (permalink)
| | Expert Mamber
Join Date: May 2004
Posts: 341
| Re: let PMS 2 send an email when sending a new message Ho un problema, quando arriva la mail di avviso, il soggetto della mail è ok, ma nel corpo ho riportato solo questo:
_PMS_MSG_NOTIFY_BODY
Nel component questo è il codice inserito: ### send email notify to recipient (by tassoman.com)
$sqlEmailRecipient = "SELECT name, email FROM #__users where username='$_POST[recip]'";
$database->setQuery($sqlEmailRecipient);
$rows = $database->loadObjectList();
$recipientName = $rows[0]->name;
$recipientEmail = $rows[0]->email;
mail( $recipientEmail, _PMS_MSG_NOTIFY_SUBJ, _PMS_MSG_NOTIFY_BODY, "From: Il Nucleo <info@ilnucleo.org>\r\nReply-To: \r\n");
### end sends email notify
nella lingua: DEFINE('_PMS_MSG_NOTIFY_SUBJ','Hai un nuovo messaggio privato su Il Nucleo!');
DEFINE('_PMS_MSG_NOTIFY_SUBJ','Ciao, $recipientName\n\n hai un nuovo messaggio privato, scritto per te da un utente de Il Nucleo!\n\nClicca il link sottostante per leggere il messaggio privato:\n http://$_SERVER[SERVER_NAME]/component/option,com_pms/page,inbox\n\nhttp://www.ilnucleo.org - La Comunità Italiana per gli appassionati di Giochi di Ruolo.');
Perchè non compare il testo nel body della mail? Che sbaglio?
ciao,
Elwood
__________________ "Im Nucleo war Ich bloss der Buchhalter des Todes" |
| |
23.08.2004, 11:49
|
#9 (permalink)
| | Junior Mamber
Join Date: Aug 2004
Posts: 28
| Re: let PMS 2 send an email when sending a new message Quote: |
Originally Posted by Elwood Ho un problema, quando arriva la mail di avviso, il soggetto della mail è ok, ma nel corpo ho riportato solo questo:
nella lingua: DEFINE('_PMS_MSG_NOTIFY_SUBJ','Hai un nuovo messaggio privato su Il Nucleo!');
DEFINE('_PMS_MSG_NOTIFY_BODY','Ciao, $recipientName\n\n hai un nuovo messaggio privato, scritto per te da un utente de Il Nucleo!\n\nClicca il link sottostante per leggere il messaggio privato:\n http://$_SERVER[SERVER_NAME]/component/option,com_pms/page,inbox\n\nhttp://www.ilnucleo.org - La Comunità Italiana per gli appassionati di Giochi di Ruolo.');
Perchè non compare il testo nel body della mail? Che sbaglio?
ciao,
Elwood | Hai messo subj per entrambi 
In realtà l'avevo messo io, e copia incolla è venuto fuori sbagliato, mi scuso  |
| |
23.08.2004, 17:38
|
#10 (permalink)
| | Expert Mamber
Join Date: May 2004
Posts: 341
| Re: let PMS 2 send an email when sending a new message Ops... Grazie!!!
Elwood
__________________ "Im Nucleo war Ich bloss der Buchhalter des Todes" |
| | | Thread Tools | | | | Display Modes | Linear Mode |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | All times are GMT +2. The time now is 15:49. | | | |