We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15170
    • 90 Posts
    Hi,
    I receive emails from my server using Drupal, Wordpress and my static sites. However I cannot receive any emails from MODx.
    I tried eForms, new user ...There are no error messages, just no emails being received in my Gmail account!

    Please Help.
      • 3647
      • 177 Posts
      Think you should try and send yourself a password reminder first
      This would narrow it down to eForm rather than a basic issue on the server.
        • 15170
        • 90 Posts
        Hi Bluespark,

        Thanks for the reply.

        I did that. In the new user sign up I asked for the details to be sent via email. ["send the new password by email"]
        None arrived. I don’t think it is an eForm problem. I have even enabled debugging. No problems mentioned.

        Jan
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          How are the other applications sending their mail? Do they use the PHP mail() function, or SMTP?
          Can you add your domain’s default email address to your gmail address book so it will whitelist it? Do you have a valid "from" address?
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 15170
            • 90 Posts
            Hi Susan,

            On my static sites I am using this:

            <?php
                             $error    = ''; // error message
                             $name     = ''; // sender's name
                             $email    = ''; // sender's email address
                             $subject  = ''; // subject
                             $message  = ''; // the message itself
                           	 $spamcheck = ''; // Spam check
            
                        if(isset($_POST['send']))
                        {
                             $name     = $_POST['name'];
                             $email    = $_POST['email'];
                             $subject  = $_POST['subject'];
                             $message  = $_POST['message'];
                           	 $spamcheck = $_POST['spamcheck'];
            
                            if(trim($name) == '')
                            {
                                $error = '<div class="errormsg">Please enter your name!</div>';
                            }
                        	    else if(trim($email) == '')
                            {
                                $error = '<div class="errormsg">Please enter your email address!</div>';
                            }
                            else if(!isEmail($email))
                            {
                                $error = '<div class="errormsg">You have enter an invalid e-mail address. Please, try again!</div>';
                            }
                        	    if(trim($subject) == '')
                            {
                                $error = '<div class="errormsg">Please enter a subject!</div>';
                            }
                        	else if(trim($message) == '')
                            {
                                $error = '<div class="errormsg">Please enter your message!</div>';
                            }
            	          	else if(trim($spamcheck) == '')
            	            {
            	            	$error = '<div class="errormsg">Please enter the number for Spam Check!</div>';
            	            }
            	          	else if(trim($spamcheck) != '5')
            	            {
            	            	$error = '<div class="errormsg">Spam Check: The number you entered is not correct! 2 + 3 = ???</div>';
            	            }
                            if($error == '')
                            {
                                if(get_magic_quotes_gpc())
                                {
                                    $message = stripslashes($message);
                                }
            
                                // the email will be sent here
                                // make sure to change this to be your e-mail
                                $to      = "[email protected]";
            
                                // the email subject
                                // '[Message From Kenya-Portals.Com] :' will appear automatically in the subject.
                                // You can change it as you want
            
                                $subject = '[Message From Kenya-Portals.Com] : ' . $subject;
            
                                // the mail message ( add any additional information if you want )
                                $msg     = "From : $name \r\ne-Mail : $email \r\nSubject : $subject \r\n\n" . "Message : \r\n$message";
            
                                mail($to, $subject, $msg, "From: $email\r\nReply-To: $email\r\nReturn-Path: $email\r\n");
                        ?>
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              Then MODx should have no problem. Maybe for some reason gmail thinks the domain that isn’t working is spam and is dropping the mail? Can you use that mail account to set up a mail client, and send and receive mail with it?
                Studying MODX in the desert - http://sottwell.com
                Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                Join the Slack Community - http://modx.org
                • 15170
                • 90 Posts
                I changed my email from Gmail to my Fastmail account.
                Still no emails.

                Here is the debugging reply:

                'formid' passed using rule: #VALUE feedbackForm, (input=feedbackForm)
                '                   Subject' passed using rule: #LIST 1,2,3, (input=1)
                SESSION HASH:
                FORM HASH:
                Mail Headers:
                From: [email protected] (KenWeb Websites)
                Reply-to:[email protected]
                To: "[email protected]"
                Subject: KenWeb feedback
                CC:
                BCC:
                  • 25663 MODX Staff
                  • 12,272 Posts
                  You should probably change the from email address ([email protected]). I suspect it’s blocked at the mail server level before it ever gets to your inbox.
                    Ryan Thrash, MODX Co-Founder
                    Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                    • 15170
                    • 90 Posts
                    Quote from: rthrash at Sep 04, 2009, 07:56 AM

                    You should probably change the from email address ([email protected]). I suspect it’s blocked at the mail server level before it ever gets to your inbox.

                    Hi Ryan,

                    Where do I change this?
                      • 28042 ☆ A M B ☆
                      • 24,524 Posts
                      Tools -> Configuration, the User tab, the E-mail Address field.
                        Studying MODX in the desert - http://sottwell.com
                        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                        Join the Slack Community - http://modx.org