System sending e-mails?

Forum
Last Post
Threads / Messages

GeneticAlpha

Loving Mysidia!
Member
Joined
May 24, 2020
Messages
287
Points
18
Age
31
Location
Tennessee
Mysidian Dollar
13,377
So the system is sending emails when a member gets a donation alert, where is this code at? I'm wanting it to not send the emails and just do the private message I set up. But I can't find any email function in donate.php or donateview.php and the only other donate file I see is lang_donate.
 
Theres a method donate in the file /classes/class_members.php(assuming you are using Mys v1.3.5, the equivalent file is /model/domainmodel/member.php for Mys v1.3.6), and the code for sending email can be found inside this method:

PHP:
    public function donate(User $recipient, $amount){
      $mysidia = Registry::get("mysidia");     
      // First thing first, let's update the money field for the two users
      $this->changecash(-$amount);
      $recipient->changecash($amount);   
      
      // Then attempt to send an email to the recipient
      $recipient->getoptions();
       if($recipient->options->newmessagenotify == 1){
         // We are sending this user an email about the donation
         $headers = "From: {$mysidia->settings->systememail}";
         $sitename = $mysidia->settings->sitename;
         $message = "Hello {$recipient->username};\n\nYou have received {$amount} {$mysidia->settings->cost} donation from {$this->username} at {$sitename}.
                        Thank You.  The {$siteName} team.";
                        
         mail($recipient->email, $sitename." - You Have Received a {$mysidia->settings->cost} Donation", $message, $headers);
      }           
  }
 
Theres a method donate in the file /classes/class_members.php(assuming you are using Mys v1.3.5, the equivalent file is /model/domainmodel/member.php for Mys v1.3.6), and the code for sending email can be found inside this method:

PHP:
    public function donate(User $recipient, $amount){
      $mysidia = Registry::get("mysidia");    
      // First thing first, let's update the money field for the two users
      $this->changecash(-$amount);
      $recipient->changecash($amount);  
     
      // Then attempt to send an email to the recipient
      $recipient->getoptions();
       if($recipient->options->newmessagenotify == 1){
         // We are sending this user an email about the donation
         $headers = "From: {$mysidia->settings->systememail}";
         $sitename = $mysidia->settings->sitename;
         $message = "Hello {$recipient->username};\n\nYou have received {$amount} {$mysidia->settings->cost} donation from {$this->username} at {$sitename}.
                        Thank You.  The {$siteName} team.";
                       
         mail($recipient->email, $sitename." - You Have Received a {$mysidia->settings->cost} Donation", $message, $headers);
      }          
  }
Thanks Famer!
 

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,277
Messages
33,122
Members
1,602
Latest member
BerrieMilk
BETA

Latest Threads

Latest Posts

Top