Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules
Author Message
elnegro
Hangin' Around



Joined: Aug 25, 2006
Posts: 34
Location: Verona (ITALY)

PostPosted: Sun Nov 13, 2011 6:00 pm Reply with quote

Hi everybody,

does anybody knows the best way to add TegoNuke Mailer's functionality in new modules. In other words: do you have a code snippet using tegonuke mailer to change with the "mail function"?

_________________
Bye, Luca 
View user's profile Send private message
kguske
Site Admin



Joined: Jun 04, 2004
Posts: 6432

PostPosted: Wed Nov 16, 2011 9:22 am Reply with quote

You might wish to look at existing modules that use it as an example. The Feedback module in Ravennuke might be a good example.

_________________
I search, therefore I exist...
nukeSEO - nukeFEED - nukePIE - nukeSPAM - nukeWYSIWYG
 
View user's profile Send private message
elnegro







PostPosted: Wed Nov 16, 2011 3:45 pm Reply with quote

kguske wrote:
You might wish to look at existing modules that use it as an example. The Feedback module in Ravennuke might be a good example.


Yes, and this is the result:

Code:


function sendMail($userEmail, $subject, $message, $fromEmail) {
   global $sitename;

   $rc_email = 0;
   if (defined('TNML_IS_ACTIVE')) {
      $to = array(array($userEmail, $userEmail));
      $rc_email = tnml_fMailer($to, $subject, $message, $fromEmail, $sitename);
   } else {
      $rc_email = mail("$user_email", "$subject", "$message", "From: $sitename <$fromEmail>\r\nX-Mailer: PHP/" . phpversion());
   }

   return $rc_email;
}
 
kguske







PostPosted: Wed Nov 16, 2011 3:54 pm Reply with quote

Yes, thank you for posting. Was this what you needed?
 
elnegro







PostPosted: Wed Nov 16, 2011 4:11 pm Reply with quote

Yes. I posted the function I wrote which replaces the mail function of php.
 
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Sat Nov 19, 2011 12:45 pm Reply with quote

The latest Mailer now avoids the function call of defined() and you can just use this instead:

if (TNML_IS_ACTIVE) {

That is assuming you have properly modified the core file edits as well.

Note, TegoNuke(tm) Mailer instructions are on my wiki.

_________________
Where Do YOU Stand?
HTML Newsletter::ShortLinks::Mailer::Downloads and more... 
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©