Author Topic: Don't send ANY mail  (Read 13389 times)

0 Members and 1 Guest are viewing this topic.

Offline ClickyMouse

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Don't send ANY mail
« on: January 27, 2008, 08:05:59 PM »
How can I configure 4images, so it doesn't send ANY mail?

Because I've setted Account Activation to NONE, but when someone register, a mail send error appears...

How can I fix it?

Thanks in advance!

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Don't send ANY mail
« Reply #1 on: January 27, 2008, 08:39:29 PM »
Quote
a mail send error appears...

What is error message ?
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline ClickyMouse

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: Don't send ANY mail
« Reply #2 on: January 27, 2008, 10:09:47 PM »
Sorry... I should said that... :oops:

Here you got:
Code: [Select]
Email Error: HELO invalid mail server response: 451 timeout (#4.4.3)
See ya!
(And thanks)

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Don't send ANY mail
« Reply #3 on: January 27, 2008, 10:24:36 PM »
Ok, I code patch for this.

// Step 1

In admin/settings.php file,

find:

Code: [Select]
function show_account_activation_options($setting_name, $setting_value) {
  global $account_activation_optionlist;
  foreach ($account_activation_optionlist as $key => $val) {
    echo "<input type=\"radio\" name=\"setting_item[".$setting_name."]\" value=\"$key\"";
    if ($setting_value == $key) {
      echo " checked=\"checked\"";
    }
    echo "> ".$val."<br />";
  }
}

add after:

Code: [Select]
function show_use_email_select($setting_name, $setting_value) {
  global $use_send_email_optionlist;
  echo "<select name=\"setting_item[".$setting_name."]\">";
  foreach ($use_send_email_optionlist as $key => $val) {
    echo "<option value=\"$key\"";
    if ($setting_value == $key) {
      echo " selected=\"selected\"";
    }
    echo ">".$val."</option>";
  }
  echo "</select>";
}

find:

Code: [Select]
show_table_separator($setting_group[4], 2, "setting_group_4");

add after:

Code: [Select]
show_setting_row("use_send_email", "show_use_email_select");

// Step 2

In lang/english/admin.php file,

find:

Code: [Select]
$setting_group[4]="Upload settings";

add after:

Code: [Select]
$setting['use_send_email'] = "Enable emails from gallery ?";
$use_send_email_optionlist = array(
"1" => "Yes",
"0" => "No"
);

// Step 3

In includes/email.php file,

find:

Code: [Select]
$this->use_smtp = ($config['use_smtp'] == 1) ? 1 : 0;

add before :

Code: [Select]
$this->use_send_email = (isset($config['use_send_email']) && $config['use_send_email'] == 1) ? 1 : 0;

find:

Code: [Select]
function send_email() {
    if ($this->use_smtp) {
      return ($this->smtp_mail($this->to, $this->subject, $this->body, $this->create_header())) ? 1 : 0;
    }
    else {
      return (mail($this->to, $this->subject, $this->body, $this->create_header())) ? 1 : 0;
    }
  }

replace:

Code: [Select]
function send_email() {
      if ($this->use_send_email) {
          if ($this->use_smtp) {
              return ($this->smtp_mail($this->to, $this->subject, $this->body, $this->create_header())) ? 1 : 0;
          } else {
              return (mail($this->to, $this->subject, $this->body, $this->create_header())) ? 1 : 0;
          }
      }   
  }

// Step 4

In SQL Patches MOD (expert mode) -

use:

Code: [Select]
INSERT INTO `4images_settings` (setting_name, setting_value) VALUES('use_send_email', 0);

// Is work:

In ACP - > Setting page. See for: Upload settings and set for use email in first row. ;)
« Last Edit: January 27, 2008, 10:55:02 PM by thunderstrike »
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline ClickyMouse

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: Don't send ANY mail
« Reply #4 on: January 27, 2008, 10:35:12 PM »
Thank you so much man!!!
Now it works perfectly!! 8)


PD: I couldn't config the smtp to work with GMail, there isn't any way to do that? (I've SenMail disabled on my Hosting, but fsockopen() enabled)

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Don't send ANY mail
« Reply #5 on: January 27, 2008, 10:37:28 PM »
Quote
Thank you so much man!!!
Now it works perfectly!!

Purfect.

Quote
PD: I couldn't config the smtp to work with GMail, there isn't any way to do that? (I've SenMail disabled on my Hosting, but fsockopen() enabled)

No possible with fsockopen with Gmail but try this for advanced email class: http://www.4homepages.de/forum/index.php?topic=18744.0 - Gmail option include. ;)
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Don't send ANY mail
« Reply #6 on: January 27, 2008, 10:55:29 PM »
Oops ... I fix step 3 and add step 4 in patch ... please try again.
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline ClickyMouse

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: Don't send ANY mail
« Reply #7 on: January 27, 2008, 11:41:45 PM »
Thanks!
I'll try that...

Altough, I don't understand the fourth step:
Code: [Select]
INSERT INTO `4images_settings` (setting_name, setting_value) VALUES('use_send_email', 0);
What is it?

Thanks again!

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Don't send ANY mail
« Reply #8 on: January 27, 2008, 11:47:46 PM »
If no get step 4, is ok - use plugin: http://www.4homepages.de/forum/index.php?topic=19254.0

and paste line in expert mode (1 time for install is need for this step). ;)
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline ClickyMouse

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: Don't send ANY mail
« Reply #9 on: January 28, 2008, 12:01:45 AM »
I did it, and it says "Done"...

But also, it gave me this error:
Code: [Select]
Warning: Missing argument 1 for check_post_comment_valid_chars(), called in /www/110mb.com/g/r/u/p/o/s/c/o/gruposcout508/htdocs/fotos/admin/plugins/sql_patches.php on line 116 and defined in /www/110mb.com/g/r/u/p/o/s/c/o/gruposcout508/htdocs/fotos/includes/functions.php on line 2125
It's OK? Or it doesn't get installed?

Thanks!

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Don't send ANY mail
« Reply #10 on: January 28, 2008, 12:07:52 AM »
8O

I fix step 5 for SQL patches. ;)
[edit] - and yes - if is say: Done in window - is install. ;)
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline ClickyMouse

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: Don't send ANY mail
« Reply #11 on: January 28, 2008, 12:23:54 AM »
Thanks man!

But what was that error?

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Don't send ANY mail
« Reply #12 on: January 28, 2008, 12:26:08 AM »
Quote
But what was that error?

I call function but no value for return true or false. Thank for report this. ;)
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline ClickyMouse

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: Don't send ANY mail
« Reply #13 on: January 28, 2008, 03:23:17 AM »
 :?
Code: [Select]
Fatal error: Call to undefined function show_use_email_select() in /www/110mb.com/g/r/u/p/o/s/c/o/gruposcout508/htdocs/fotos/admin/settings.php on line 173
It was going good before... I don't know why now it appears this...

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Don't send ANY mail
« Reply #14 on: January 28, 2008, 02:48:30 PM »
Check in admin/settings.php file see if have function show_use_email_select.
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?