Results 1 to 6 of 6

Thread: Everything works except sending

  1. #1
    Join Date
    Jul 2004
    Posts
    5

    Default Everything works except sending

    I wonder if anyone out there can give me a hand.

    So far, I have run the testemail.php, everything works fine, I've set the DEF_ALERT to send me email errors, and I receive them fine. I also set up the script to write to a logfile (mainly as a test). Once again, no problem.

    However, if I try to set recipients, both in the form and in TARGET_EMAIL, it gives me the error:
    "An error occurred while processing the form."

    It informs me through email:
    "mail_failed
    **********
    Error=Failed to send email
    "

    Also, I tried to set TARGET_EMAIL both ways:
    $TARGET_EMAIL = array(EMAIL_NAME."name@myemail\.com$");
    and
    $TARGET_EMAIL = array("name@myemail\.com$");

    Any idea? I really would like to stick with this Formmail script since I've used others for several years, and this seems from what I've read to be the most solid.

    Thanks,
    Aaron

  2. #2
    Join Date
    Dec 2003
    Posts
    3,980

    Default Re: Everything works except sending

    Hi,

    PHP Code:
    $TARGET_EMAIL = array(EMAIL_NAME."name@myemail\.com$"); 
    This is incorrect...it should be:

    PHP Code:
    $TARGET_EMAIL = array(EMAIL_NAME."@myemail\.com$"); 
    Your other attempt:

    PHP Code:
    $TARGET_EMAIL = array("name@myemail\.com$"); 
    should work, but for security purposes you really want:

    PHP Code:
    $TARGET_EMAIL = array("^name@myemail\.com$"); 
    Since you've tried something that should work, and it doesn't, you can email your form and configured formmail.php to me at supportstaff AT tectite DOT com and I'll take a quick look.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  3. #3
    Join Date
    Dec 2003
    Posts
    3,980

    Default Re: Everything works except sending

    Hi,

    I got your email, thanks for the info.

    I note that Yahoo are using sendmail. It's entirely possible that their sendmail needs the annoying "-f" option to operate.

    Try adding this to your HTML form:

    Code:
    <input type="hidden" name="mail_options" value="SendMailFOption" />
    This tells FormMail to add the "-f" option when sending mail.

    If this still doesn't work, I think it's a security issue: Yahoo won't allow an email to be declared "From" an address that's not from the actual server.

    I don't think such a policy achieves much except to annoy website owners such as yourself, but if that's what's happening and the above suggestion doesn't work, let me know and we can work on it further with you.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  4. #4
    Join Date
    Jul 2004
    Location
    Minnesota
    Posts
    4

    Default Re: Everything works except sending

    I use yahoo webhosting as well, and I found that uncommenting $FROM_USER=""; at line (about) 1082 and putting in an email address at yoursite.com fixes the problem (as far as I can tell). Yahoo just won't send an email "from" somewhere that isn't your server. the address I put in isn't even a valid yahoo ID, it's just something to tell me where the form is coming from.

    Hope this can help

    Isaac

  5. #5
    Join Date
    Jul 2004
    Posts
    5

    Default Re: Everything works except sending

    I tried your suggestion, but I received this message:

    The following error occurred in FormMail:
    You've specified 'SendMailFOption', but there's no email address to use

    I guess I'll just have to accept what I did from the beginning when I was told their host was Yahoo, "...it stinks (at least to me and my agenda)"

    Thanks for your help,
    Aaron

  6. #6
    Join Date
    Dec 2003
    Posts
    3,980

    Default Re: Everything works except sending

    Hi,

    You can't use SendMailFOption and set $FROM_USER to empty string.

    The $FROM_USER is for alert messages, not for general form submissions. If you try setting $FROM_USER to empty string, just disable the SendMailFOption you're passing from the form. To disable a mail_options setting, put a "." in front of the word:
    Code:
    <input .... name="mail_options" value=".SendMailFOption" />
    This won't resolve the form submission issue, just FormMail sending you alert messages.

    The next step is to set the "email" field to yourself and pass the user's email address in a different field. Here's what to do to your form:
    1. After playing with the above (if you want), disable the SendMailFOption in your form.
    2. Look for your "email" field and rename it to "FromUser", or something like that.
    3. Add the following hidden field to your form:
      Code:
      <input type="hidden" name="email" value="you@yoursite.com" />
    Now the form submission should work and you'll see the user's email address in the body of the form results.

    If that works (it certainly should), you can also try leaving the "email" out of the form altogether.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Sending form results in an HTML email
    By russellr in forum HOWTO Guides and Tips
    Replies: 26
    Last Post: 12-Jan-2006, 08:31 PM
  2. Script Works, Email Contains No Information
    By JakeForest in forum FormMail Subscription Support
    Replies: 10
    Last Post: 28-Dec-2005, 10:51 PM
  3. sending me two emails
    By srolls in forum FormMail Subscription Support
    Replies: 2
    Last Post: 20-Sep-2004, 11:15 PM
  4. Problem with new server sending mail
    By mstookey in forum FormMail Subscription Support
    Replies: 7
    Last Post: 25-Jun-2004, 01:27 AM
  5. Formmail works fine, but no e-mail
    By Wiggy in forum FormMail Subscription Support
    Replies: 1
    Last Post: 08-Jan-2004, 04:05 AM

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
  •