Freeform emails not being sent on Windows server
Posted: 26 August 2009 12:31 PM   [ Ignore ]
Newbie
Rank
Total Posts:  7
Joined  2009-01-23

Hey there,

I’m having trouble getting emails to send from Freeform on a Windows server.  Since this is Windows, I’m not really sure how to debug the problem, so any pointers or help is appreciated.  Here’s the facts, and what I’ve tried already:

- We’re running version 1.6.8 (build 20090723) of EE, and 2.7.2 of Freeform

- Freeform entries are all being saved successfully to the module, but no emails are going out.  Switching to ‘default_template’ does not affect whether an email goes out or not.

- Using EE’s Communicate tab or {exp:email:contact_form} successfully sends emails.

At the client’s insistence, I’ve had to switch over to using exp:email:contact_form, which is a terrible solution.  Any ideas how to debug what’s going wrong?  Thanks!

Here’s the template code for your reference.  I’ve verified that ‘event_registration’ is an email template defined in Freeform:

{exp:freeform:form form_name="event_registration" required="email" notify="email1@domain.com|email2@domain.com"
  
template="event_registration" return="events/view/{url_title}/thanks/"}
<fieldset>
    <
div class="row">
        <
div>
            <
label for="f-fname">First Name:</label>
            <
input type="text" name="first_name" value="" id="f-fname" />
        </
div>
        <
div class="last">
            <
label for="f-lname">Last Name:</label>
            <
input type="text" name="last_name" value="" id="f-lname" />
        </
div>
    </
div>
    <
div class="row">
        <
div>
            <
label for="f-email">E-mail:</label>
            <
input type="text" name="email" value="" id="f-email" />
        </
div>
        <
div class="last">
            <
label for="f-phone">Phone:</label>
            <
input type="text" name="phone" value="" id="f-phone" />
        </
div>
    </
div>
    ... 
more form contents (it's fairly long, so I didn't want to post it all) ...
</
fieldset>
{/exp:freeform:form} 

Thanks for your help in advance!

Profile
 
 
Posted: 26 August 2009 03:14 PM   [ Ignore ]   [ # 1 ]
Jr. Member
RankRank
Total Posts:  49
Joined  2005-04-25

Can you send email via the Communicate tab?

Profile
 
 
Posted: 26 August 2009 03:33 PM   [ Ignore ]   [ # 2 ]
Newbie
Rank
Total Posts:  7
Joined  2009-01-23

- Using EE’s Communicate tab or {exp:email:contact_form} successfully sends emails.

grin

Profile
 
 
Posted: 27 August 2009 03:02 PM   [ Ignore ]   [ # 3 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  8223
Joined  2006-10-18

Tierra Technology,

Is there any chance the notifications are being blocked by a Spam setting, or being placed into a Spam folder? smile

Any chance of switching to a non-Windows server raspberry

 Signature 
Profile
 
 
Posted: 27 August 2009 03:03 PM   [ Ignore ]   [ # 4 ]
Newbie
Rank
Total Posts:  7
Joined  2009-01-23
Kelsey Martens - 27 August 2009 03:02 PM

Is there any chance the notifications are being blocked by a Spam setting, or being placed into a Spam folder? smile

No, I’ve checked for this; should have mentioned it in the first post.

Any chance of switching to a non-Windows server raspberry

God, I wish.

Any suggestions for how to debug this thing?  I’m not sure where to even look for the error.

Profile
 
 
Posted: 28 August 2009 09:13 AM   [ Ignore ]   [ # 5 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  8223
Joined  2006-10-18

Hi Tierra Technology,

I’m going to have a developer take a look at this smile

In the meantime, can you also confirm that you’ve tried this out with ONLY the code below in a clean template with no other HTML code, CSS, JS, etc? smile
Also, are you able to PM me CP and FTP access?

 Signature 
Profile
 
 
Posted: 28 August 2009 03:55 PM   [ Ignore ]   [ # 6 ]
Newbie
Rank
Total Posts:  7
Joined  2009-01-23

Thanks, Kelsey,

I’ll see about getting you access on Monday; ran out of time today thanks to clients thinking they had emergencies when really they didn’t.  :-\

Profile
 
 
Posted: 31 August 2009 09:42 AM   [ Ignore ]   [ # 7 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  8223
Joined  2006-10-18

Hi Tierra Technology,

Can you try one other thing… if you’re using PHP Mail, can you try to switch it to SMTP? smile

 Signature 
Profile
 
 
Posted: 01 September 2009 11:32 AM   [ Ignore ]   [ # 8 ]
Newbie
Rank
Total Posts:  7
Joined  2009-01-23

I’ve PM-ed you CP access; I also setup a template with just the form and tried that out, but still no love.  I’m not sure what the SMTP details for the server are, so I haven’t tested that but I can try to track down the server admin if that would help.  Since PHP Mail is working great in the communicate tab and for exp:email:contact_form, though I figured it wasn’t likely to make much difference.  Let me know if you need anything else!

Profile
 
 
Posted: 03 September 2009 01:18 PM   [ Ignore ]   [ # 9 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  8223
Joined  2006-10-18

Tierra Technology,

I tested it out using the login you gave me… seems to work fine wink
Have a look at “events/solspace_test” (using default_template)

I looked at your other custom notification template has {first_name} and {last_name} variables for the name. For the heck of it, try changing it to just regular text like “Test”.

Other possible issues are JS or CSS conflict wink

 Signature 
Profile
 
 
Posted: 03 September 2009 02:20 PM   [ Ignore ]   [ # 10 ]
Newbie
Rank
Total Posts:  7
Joined  2009-01-23

Bizarre.  When I tested default_template originally, it didn’t work.  Freeform must like you better.  grin

After doing another round of testing (with new templates, modified original templates, and various other things) I finally discovered that the problem was the existence of anything (doesn’t really matter what) in the template’s “From Name” and “From Email” fields.  Once I removed everything from those fields, sending emails started working!  Huzzah!

So note to Windows IIS users who aren’t able to send emails using Freeform: if you’re able to send email from the Communicate tab, don’t specify the from name and email.  That might be your problem.

Thanks for your help, Kelsey!

Profile
 
 
Posted: 03 February 2010 03:44 PM   [ Ignore ]   [ # 11 ]
Newbie
Rank
Total Posts:  7
Joined  2009-01-23

Just wanted to update this thread in the hopes that it will help others or Kelsey (when other people run into the problem).  I’ve been having further problems with Freeform failing to send emails on IIS (even though the Communicate tab works fine), and I finally tracked down the fix in this thread on the EE forums:

http://expressionengine.com/forums/viewthread/64674/

Basically the problem is that EE formats the From header as “Name <email>” and Windows chokes unless it’s formatted “<email>”.  Changing one line in the core email class fixed the problem for me on this particular IIS server.

Profile
 
 
Posted: 03 February 2010 11:50 PM   [ Ignore ]   [ # 12 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  8223
Joined  2006-10-18

Thanks Tierra smile

 Signature 
Profile
 
 
Posted: 04 February 2010 09:07 AM   [ Ignore ]   [ # 13 ]
Newbie
Rank
Total Posts:  2
Joined  2009-11-25

Just as a note we had a similar issue and removing the from name fixed ours as well.

We ran into this with CodeIgniter sites too. Really annoying. It’s IIS’s SMTP service.

Profile