Results 1 to 8 of 8

Thread: Form sending error

  1. #1
    New user
    Join Date
    09-18-14.
    Posts
    9

    Default Form sending error

    I have the website I am working on hosted at GoDaddy and on the website I created a formular using the form generator. This form does not work, does not send at all, instead I get an error on e-mail, this error:

    Final-Recipient: RFC822; me@mymail.com
    Action: failed
    Status: 5.0.0
    Diagnostic-Code: SMTP; 550 sid:MQpP1p0010bssRk01:Message rejected for restricted from domain

    I couldn't found a solution for this, anyone here who can help?

  2. #2
    Community-Moderator xchs's Avatar
    Join Date
    06-19-09.
    Posts
    1,100

    Default

    Quote Originally Posted by Devilish1208 View Post
    Message rejected for restricted from domain
    The mail server complains about the "from" domain name. You would have to use an email address with a domain name hosted on GoDaddy. That said, for your registered domain name (e.g. example.com) just set up an email address "foo@example.com", i.e. with the same domain name.

    You may want to set the recipient email address in the form settings accordingly as well as the "E-mail address of the website administrator" in the "Website root" page settings (see "Site structure")

    In case you want to use a different mail server, populate all the relevant input fields for the SMTP configuration (see the "System settings") with the appropriate SMTP credentials and hostname.
    Contao Community Moderator
    → Support options

  3. #3
    New user
    Join Date
    09-18-14.
    Posts
    9

    Default

    Quote Originally Posted by xchs View Post
    The mail server complains about the "from" domain name. You would have to use an email address with a domain name hosted on GoDaddy. That said, for your registered domain name (e.g. example.com) just set up an email address "foo@example.com", i.e. with the same domain name.

    You may want to set the recipient email address in the form settings accordingly as well as the "E-mail address of the website administrator" in the "Website root" page settings (see "Site structure")

    In case you want to use a different mail server, populate all the relevant input fields for the SMTP configuration (see the "System settings") with the appropriate SMTP credentials and hostname.

    I tried to use the SMTP feature but couldn't manage to make it work, I was getting no error but no email as well. I'll try the other solution you provided and post the feedback.

    Thank you for your prompt answers!

  4. #4
    New user
    Join Date
    09-18-14.
    Posts
    9

    Default

    I still can't manage to make it work...I can't think of anything that I might be doing wrong because just now I tried to send some emails like newsletters, from the backend newsletter section and this feature works perfectly!

    If I check the log file now I see this: "[15-Dec-2014 19:50:09] An e-mail has been sent to email@adress.com". What does this mean? I don-t receive any email!

    Any other ideas why the forms won't work?
    Last edited by Devilish1208; 12/15/2014 at 21:30.

  5. #5
    New user
    Join Date
    09-18-14.
    Posts
    9

    Ausrufezeichen

    Problem SOLVED!

    Solution: Modified the Email.php file in system/modules/core/library/Contao and forced the SENDER of the email to what I want it to be like this:
    Code:
    /*// Add the administrator e-mail as default sender
    		if ($this->strSender == '')
    		{
    			list($this->strSenderName, $this->strSender) = \String::splitFriendlyEmail(\Config::get('adminEmail'));
    		}
    
    		// Sender
    		if ($this->strSenderName != '')
    		{
    			$this->objMessage->setFrom(array($this->strSender=>$this->strSenderName));
    		}
    		else
    		{
    			$this->objMessage->setFrom($this->strSender);
    		}*/
            
            $this->objMessage->setFrom('email@example.com');
    Attention: The part above the bold line of code is commented!

  6. #6
    Community-Moderator xchs's Avatar
    Join Date
    06-19-09.
    Posts
    1,100

    Default

    You should avoid changing core files! Did you enter an "E-mail address of the system administrator" in the system settings?

    Last edited by xchs; 12/16/2014 at 01:33.
    Contao Community Moderator
    → Support options

  7. #7
    New user
    Join Date
    09-18-14.
    Posts
    9

    Default

    Quote Originally Posted by xchs View Post
    You should avoid changing core files! Did you enter an "E-mail address of the system administrator" in the system settings?

    I did but still didn't work

  8. #8
    User tetrijeb's Avatar
    Join Date
    04-19-12.
    Location
    Bosnia&Herzegovina
    Posts
    98

    Default

    Quote Originally Posted by Devilish1208 View Post
    I tried to use the SMTP feature but couldn't manage to make it work, I was getting no error but no email as well. I'll try the other solution you provided and post the feedback.

    Thank you for your prompt answers!
    My hosting server has also blocked smtp, although my form gave me "thank you for message" answer. Couldn't connect to outgoing server, connection refused [Error #111]

    So, I tried without smtp, just to use phpmail() function and it is working.

    Support advised me to use ip address of server instead of alias smtp.******.net, but I didn't since previous method with function is working.

    Did you check the log file for the error?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •