Joomla 3.4 - PHP Mail and Sendmail doesn't work

General questions relating to Joomla! 3.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Locked
towerman
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Mon Dec 22, 2014 9:58 am

Joomla 3.4 - PHP Mail and Sendmail doesn't work

Post by towerman » Mon Mar 16, 2015 9:56 am

Problem Description :: Forum Post Assistant (v1.2.4) : 16th March 2015 wrote:I've just updated my website to Joomla 3.4.
Every time i request to send the email to who is contact me, i received an error.
I've tried using PHP Mail and Send mail but I still have an error.
Without requesting the e-mail, everyhing works fine.
Log/Error Message :: Forum Post Assistant (v1.2.4) : 16th March 2015 wrote:PHP Mail: Errore in invio email. Could not instantiate mail function.
Sendmail: Errore in invio email. Could not execute: /usr/local/sbin/sendmail -t -i
Forum Post Assistant (v1.2.4) : 16th March 2015 wrote:
Basic Environment :: wrote:Joomla! Instance :: Joomla! 3.4.0-Stable (Ember) 24-February-2015
Joomla! Platform :: Joomla Platform 13.1.0-Stable (Curiosity) 24-Apr-2013
Joomla! Configured :: Yes | Read-Only (444) | Owner: *** (uid: 1/gid: 1) | Group: psacln (gid: 1) | Valid For: 1.5
Configuration Options :: Offline: 0 | SEF: 1 | SEF Suffix: 0 | SEF ReWrite: 1 | .htaccess/web.config: Yes | GZip: 0 | Cache: 0 | FTP Layer: 0 | SSL: 0 | Error Reporting: default | Site Debug: 0 | Language Debug: 0 | Default Access: N/A | Unicode Slugs: N/A | Database Credentials Present: Yes

Host Configuration :: OS: Linux | OS Version: 2.6.32-504.el6.x86_64 | Technology: x86_64 | Web Server: Apache | Encoding: gzip, deflate | Doc Root: /var/www/vhosts/***.com/test | System TMP Writable: Yes

PHP Configuration :: Version: 5.6.5 | PHP API: cgi-fcgi | Session Path Writable: No | Display Errors: | Error Reporting: 22527 | Log Errors To: | Last Known Error: | Register Globals: | Magic Quotes: | Safe Mode: | Open Base: /var/www/vhosts/***.com/:/tmp/ | Uploads: 1 | Max. Upload Size: 16M | Max. POST Size: 16M | Max. Input Time: 60 | Max. Execution Time: 30 | Memory Limit: 128M

MySQL Configuration :: Version: 5.1.73 (Client:mysqlnd 5.0.11-dev - 20120503 - $Id: f373ea5dd5538761406a8022a4b8a374418b240e $) | Host: --protected-- (--protected--) | Collation: utf8_general_ci (Character Set: utf8) | Database Size: 4.24 MiB | #of Tables:  78
Detailed Environment :: wrote:PHP Extensions :: Core (5.6.5) | date (5.6.5) | ereg () | libxml () | openssl () | pcre () | zlib (2.0) | bcmath () | bz2 () | calendar () | ctype () | curl () | dom (20031129) | hash (1.0) | fileinfo (1.0.5) | filter (0.11.0) | ftp () | gd () | gettext () | gmp () | SPL (0.2) | iconv () | session () | intl (1.1.0) | json (1.2.1) | ldap () | mbstring () | mcrypt () | standard (5.6.5) | mysql (1.0) | mysqlnd (mysqlnd 5.0.11-dev - 20120503 - $Id: f373ea5dd5538761406a8022a4b8a374418b240e $) | odbc (1.0) | pcntl () | mysqli (0.1) | PDO (1.0.4dev) | pdo_mysql (1.0.2) | pdo_pgsql (1.0.2) | Phar (2.0.2) | posix () | pspell () | Reflection ($Id: b2a30058688ac580cb2883c4283c19fd0e00d535 $) | imap () | shmop () | SimpleXML (0.1) | snmp (0.1) | soap () | sockets () | exif (1.4 $Id: 2790dc4f3043c34a40fbd6df5575e884e86f852b $) | sysvmsg () | sysvsem () | sysvshm () | tokenizer (0.1) | wddx () | xml () | xmlreader (0.1) | xmlrpc (0.51) | xmlwriter (0.1) | xsl (0.1) | cgi-fcgi () | Zend Engine (2.6.0) |
Potential Missing Extensions :: zip | suhosin |

Switch User Environment (Experimental) :: PHP CGI: Yes | Server SU: Yes | PHP SU: Yes | Custom SU (LiteSpeed/Cloud/Grid): Yes
Potential Ownership Issues: No
Folder Permissions :: wrote:Core Folders :: images/ (755) | components/ (755) | modules/ (755) | plugins/ (755) | language/ (755) | templates/ (755) | cache/ (755) | logs/ (755) | tmp/ (755) | administrator/components/ (755) | administrator/modules/ (755) | administrator/language/ (755) | administrator/templates/ (755) |

Elevated Permissions (First 10) ::
Extensions Discovered :: wrote:Components :: SITE :: WF_CLIPBOARD_TITLE (2.4.6) | WF_XHTMLXTRAS_TITLE (2.4.6) | WF_VISUALCHARS_TITLE (2.4.6) | WF_FONTSELECT_TITLE (2.4.6) | WF_LISTS_TITLE (2.4.6) | WF_ANCHOR_TITLE (2.4.6) | WF_DIRECTIONALITY_TITLE (2.4.6) | WF_CONTEXTMENU_TITLE (2.4.6) | WF_CLEANUP_TITLE (2.4.6) | WF_FORMATSELECT_TITLE (2.4.6) | WF_LINK_TITLE (2.4.6) | WF_IMGMANAGER_TITLE (2.4.6) | WF_VISUALBLOCKS_TITLE (2.4.6) | WF_KITCHENSINK_TITLE (2.4.6) | WF_FONTCOLOR_TITLE (2.4.6) | WF_STYLESELECT_TITLE (2.4.6) | WF_STYLE_TITLE (2.4.6) | WF_FULLSCREEN_TITLE (2.4.6) | WF_SOURCE_TITLE (2.4.6) | WF_PRINT_TITLE (2.4.6) | WF_SEARCHREPLACE_TITLE (2.4.6) | WF_ARTICLE_TITLE (2.4.6) | WF_AUTOSAVE_TITLE (2.4.6) | WF_PREVIEW_TITLE (2.4.6) | WF_LAYER_TITLE (2.4.6) | WF_FONTSIZESELECT_TITLE (2.4.6) | WF_CHARMAP_TITLE (2.4.6) | WF_BROWSER_TITLE (2.4.6) | WF_MEDIA_TITLE (2.4.6) | WF_INLINEPOPUPS_TITLE (2.4.6) | WF_NONBREAKING_TITLE (2.4.6) | WF_TEXTCASE_TITLE (2.4.6) | WF_SPELLCHECKER_TITLE (2.4.6) | WF_TABLE_TITLE (2.4.6) | WF_FILESYSTEM_JOOMLA_TITLE (2.4.6) | WF_MEDIAPLAYER_JCEPLAYER_TITLE (2.4.6) | WF_AGGREGATOR_VINE_TITLE (2.4.6) | WF_AGGREGATOR_VIMEO_TITLE (2.4.6) | WF_AGGREGATOR_[youtube]_TITLE (2.4.6) | WF_LINK_SEARCH_TITLE (2.4.6) | WF_POPUPS_WINDOW_TITLE (2.4.6) | WF_POPUPS_JCEMEDIABOX_TITLE (2.4.6) | WF_LINKS_JOOMLALINKS_TITLE (2.4.6) | com_wrapper (3.0.0) | com_mailto (3.0.0) |
Components :: ADMIN :: com_content (3.0.0) | RokSprocket (2.1.6) | com_redirect (3.0.0) | com_checkin (3.0.0) | Widgetkit (1.5.5) | com_admin (3.0.0) | com_installer (3.0.0) | com_weblinks (3.0.0) | com_menus (3.0.0) | com_joomlaupdate (3.0.0) | com_config (3.0.0) | com_languages (3.0.0) | com_modules (3.0.0) | com_tags (3.1.0) | com_categories (3.0.0) | com_contenthistory (3.2.0) | com_messages (3.0.0) | com_media (3.0.0) | JCE (2.4.6) | Unknown (-) | com_newsfeeds (3.0.0) | com_users (3.0.0) | com_cpanel (3.0.0) | com_login (3.0.0) | com_postinstall (3.2.0) | com_search (3.0.0) | COM_FOXCONTACT (3.4.2) | com_ajax (3.2.0) | com_cache (3.0.0) | Akeeba (4.1.2) | com_banners (3.0.0) | com_templates (3.0.0) | com_plugins (3.0.0) | com_finder (3.0.0) |

Modules :: SITE :: mod_wrapper (3.0.0) | mod_breadcrumbs (3.0.0) | Widgetkit Twitter (1.0.0) | mod_random_image (3.0.0) | RokSprocket Module (2.1.6) | MOD_FOXCONTACT (3.4.2) | mod_stats (3.0.0) | mod_articles_news (3.0.0) | mod_tags_similar (3.1.0) | mod_users_latest (3.0.0) | mod_articles_popular (3.0.0) | mod_feed (3.0.0) | mod_login (3.0.0) | mod_articles_latest (3.0.0) | mod_whosonline (3.0.0) | mod_articles_archive (3.0.0) | mod_banners (3.0.0) | mod_tags_popular (3.1.0) | mod_languages (3.0.0) | mod_articles_category (3.0.0) | Widgetkit (1.0.0) | mod_menu (3.0.0) | mod_weblinks (3.0.0) | mod_articles_categories (3.0.0) | mod_related_items (3.0.0) | mod_search (3.0.0) | mod_syndicate (3.0.0) | mod_custom (3.0.0) | mod_footer (3.0.0) | mod_finder (3.0.0) |
Modules :: ADMIN :: mod_status (3.0.0) | mod_toolbar (3.0.0) | mod_latest (3.0.0) | mod_submenu (3.0.0) | mod_popular (3.0.0) | mod_multilangstatus (3.0.0) | mod_feed (3.0.0) | mod_login (3.0.0) | mod_logged (3.0.0) | mod_quickicon (3.0.0) | mod_version (3.0.0) | mod_title (3.0.0) | mod_menu (3.0.0) | mod_stats_admin (3.0.0) | mod_custom (3.0.0) |

Plugins :: SITE :: plg_user_joomla (3.0.0) | plg_user_contactcreator (3.0.0) | plg_user_profile (3.0.0) | plg_extension_joomla (3.0.0) | plg_editors-xtd_readmore (3.0.0) | plg_editors-xtd_image (3.0.0) | plg_editors-xtd_pagebreak (3.0.0) | plg_editors-xtd_article (3.0.0) | plg_twofactorauth_yubikey (3.2.0) | plg_twofactorauth_totp (3.2.0) | System - Widgetkit (1.0.0) | plg_system_log (3.0.0) | plg_system_languagecode (3.0.0) | plg_system_highlight (3.0.0) | plg_system_sef (3.0.0) | plg_system_remember (3.0.0) | plg_system_logout (3.0.0) | plg_system_p3p (3.0.0) | plg_system_cache (3.0.0) | System - RokCommon (3.2.0) | plg_system_redirect (3.0.0) | PLG_SYS_BYEBYEGENERATOR (1.11) | System - Widgetkit Joomla (1.0.0) | System - RokSprocket (2.1.6) | System - Widgetkit ZOO (3.1.0) | plg_system_debug (3.0.0) | plg_system_languagefilter (3.0.0) | System - SEOSimple (2.2) | plg_editors_jce (2.4.6) | plg_editors_codemirror (4.12) | plg_editors_tinymce (4.1.7) | plg_captcha_recaptcha (3.4.0) | plg_finder_newsfeeds (3.0.0) | plg_finder_categories (3.0.0) | plg_finder_weblinks (3.0.0) | plg_finder_tags (3.0.0) | plg_finder_content (3.0.0) | plg_finder_contacts (3.0.0) | plg_content_loadmodule (3.0.0) | plg_content_vote (3.0.0) | Content - RokInjectModule (1.6) | plg_content_joomla (3.0.0) | plg_content_foxcontact (3.4.2) | plg_content_pagebreak (3.0.0) | plg_content_finder (3.0.0) | plg_content_emailcloak (3.0.0) | plg_content_pagenavigation (3.0.0) | Content - Widgetkit (1.0.0) | plg_search_newsfeeds (3.0.0) | plg_search_categories (3.0.0) | plg_search_weblinks (3.0.0) | plg_search_tags (3.0.0) | plg_search_content (3.0.0) | plg_search_contacts (3.0.0) | plg_quickicon_joomlaupdate (3.0.0) | plg_quickicon_jcefilebrowser (2.4.6) | plg_quickicon_extensionupdate (3.0.0) | plg_authentication_joomla (3.0.0) | plg_authentication_cookie (3.0.0) | plg_authentication_ldap (3.0.0) | plg_authentication_gmail (3.0.0) |
Templates Discovered :: wrote:Templates :: SITE :: protostar (1.0) | beez3 (3.1.0) | yoo_square (1.0.5) |
Templates :: ADMIN :: isis (1.0) | hathor (3.0.0) |

jcms
I've been banned!
Posts: 2233
Joined: Wed Nov 19, 2014 9:23 am

Re: Joomla 3.4 - PHP Mail and Sendmail doesn't work

Post by jcms » Mon Mar 16, 2015 3:36 pm

you should check the send mail function in your server first...

voland
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Fri Feb 20, 2009 5:04 pm
Location: Russia
Contact:

Re: Joomla 3.4 - PHP Mail and Sendmail doesn't work

Post by voland » Mon Mar 16, 2015 4:01 pm

change in file /libraries/vendor/phpmailer/phpmailer/class.phpmailer.php string 1161

Code: Select all

$params = sprintf('-f%s', $this->Sender);
to

Code: Select all

$params = sprintf('-f%s');
up and down Joomla: http://joomla15.ru

towerman
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Mon Dec 22, 2014 9:58 am

Re: Joomla 3.4 - PHP Mail and Sendmail doesn't work

Post by towerman » Mon Mar 16, 2015 4:08 pm

jcms wrote:you should check the send mail function in your server first...
What do I have to check?
voland wrote:change in file /libraries/vendor/phpmailer/phpmailer/class.phpmailer.php string 1161

Code: Select all

$params = sprintf('-f%s', $this->Sender);
to

Code: Select all

$params = sprintf('-f%s');
What does it change with that new code? ;)

voland
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Fri Feb 20, 2009 5:04 pm
Location: Russia
Contact:

Re: Joomla 3.4 - PHP Mail and Sendmail doesn't work

Post by voland » Mon Mar 16, 2015 4:16 pm

As you can see it will delete parameter in function and suddenly it should work ))
PS. Looks like it`s old bug in phpmailer class
up and down Joomla: http://joomla15.ru

towerman
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Mon Dec 22, 2014 9:58 am

Re: Joomla 3.4 - PHP Mail and Sendmail doesn't work

Post by towerman » Mon Mar 16, 2015 4:30 pm

voland wrote:As you can see it will delete parameter in function and suddenly it should work ))
PS. Looks like it`s old bug in phpmailer class
Thanks so much voland :D

towerman
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Mon Dec 22, 2014 9:58 am

Re: Joomla 3.4 - PHP Mail and Sendmail doesn't work

Post by towerman » Mon Mar 23, 2015 1:16 pm

Even with the code of voland, I still have the same problem with Joomla 3.4.1 :eek:
I've seen that I have this problem only with e-mail addresses that are on the same server of the website.


Locked

Return to “General Questions/New to Joomla! 3.x”