FormBuilder Problem

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
Daryn

FormBuilder Problem

Post by Daryn »

Hello!

Instead of replying to cnymike's topic (http://forum.cmsmadesimple.org/index.ph ... 582.0.html), I decided to start a new one (since that one is 120 days old). Please refer to the aforementioned topic to see cnymike's predicament and solution.

I've run into the same exact issue and have a question regarding the email address you used. Did the address have to be present on your web hosting control panel (did you have to create the actual dummy address), or were you able to use whatever you please as long as it had the correct domain name and suffix?

I've got a lot of experience with forms, sendmail, etc and I know that you can generally make up an address, but I wanted to be sure.

I've actually followed the solution that worked for you but to no avail. At this point I'm thinking it has to do with my web host. I've tried everything. Set to SMTP, mail, sendmail, changed to an email address with the proper name. Nothing.
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm

Re: FormBuilder Problem

Post by Nullig »

Have you configured CMSMailer correctly?
Can you send a test message from it?

Nullig
mbvdk
Forum Members
Forum Members
Posts: 43
Joined: Wed Jun 08, 2005 3:30 pm

Re: FormBuilder Problem

Post by mbvdk »

As far as I can se I have the same problem.

I have tested that CMSMailer can in fact send e-mails.

On the contact form that comes with FormBuilder I can send messages ad long as the sending e-mail adress specified on the actual form on the webpage is from the same domain as the website (and in this case mailserver). After doing a bit of debugging I have discovered that this is caused by the sending e-mail being rejected by the mailserver.

The format of the e-mail being sent by the form is as follows:

Code: Select all

Date: Server DateTime
To: ToAddress from "*Email Results to set Address(es)" field
From: YourName <YourAddress> set by user in form 
Reply-to: YourName <YourAddress> set by user in form 
Subject: Subject set by user in form
Content: Generated based on userfeedback in contentfield and other data collected by the form.
The problem with this is that some or most mail-servers does not allow e-mail with non-domain adrresses to be sent from that server.

The simple solution to this, is to use the adress supplied in FormBuilder as From address and the adress suplied by the user as Reply-to adress.

This howeved requires a minor change to the code of FormBuilder.

In classes/DispositionEmailBase.class.php line 91-95 should be changed from:

Code: Select all

    if ($this->SetFromAddress())
      {
	$mail->SetFrom($this->GetOption('email_from_address'));
      $mail->AddReplyTo($this->GetOption('email_from_address'),$this->SetFromName()?$this->GetOption('email_from_name'):'');
      }
To:

Code: Select all

    if ($this->SetFromAddress())
      {
// 	$mail->SetFrom($this->GetOption('email_from_address'));
      $mail->AddReplyTo($this->GetOption('email_from_address'),$this->SetFromName()?$this->GetOption('email_from_name'):'');
      }
This will make the mailer object use the adress supplied in CMSmailer.
To change the Sender Name, but not the Reply-to Name to the one set in CMSMailer outcomment line 96-99
Last edited by mbvdk on Thu Apr 10, 2008 6:33 am, edited 1 time in total.
Daryn

Re: FormBuilder Problem

Post by Daryn »

Hey guys, thanks for replying so quickly.

I discovered something with my web host that may be the problem. It's actually not a problem but really just a setting that requires change on their end. I thought this was strange but here's the deal:

With my web host (Site5), if you are using sendmail or a similar processor, your account has to be allowed to send mail to external addresses. I'm not really sure as to why this is the policy. I think it's because this method is generally used for internal-only tasks. I had to submit a support ticket with them in order for them to add me to this external allowance list and then I should be fine.

If you try to send emails using both the web form I created and the test field on the CMSMailer interface, the emails default into a repository named 'mail' in the root. When you open one of these files, it has an error stating that the user doesn't exist.

mbvdk, you touched on this as well and you were on the money.

I also tried SMTP and the same thing occurred. I'm thinking it was related to the above as well though.

I will post an update as soon as my web host changes this setting.
mbvdk
Forum Members
Forum Members
Posts: 43
Joined: Wed Jun 08, 2005 3:30 pm

Re: FormBuilder Problem

Post by mbvdk »

Forgot the name of the file needing the change

The file containing the lines in my post above is:
classes/DispositionEmailBase.class.php
Last edited by mbvdk on Thu Apr 10, 2008 6:34 am, edited 1 time in total.
Locked

Return to “Modules/Add-Ons”