+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11

Thread: Don't want to force entering an email address

  1. #1
    Join Date
    Apr 2004
    Posts
    10

    Default Don't want to force entering an email address

    Hello Russell and thanks again for this great script.

    It's working great for me but I now have a need to use it in a form where the submitter can remain anonymous if he/she chooses. I want the user to be able to leave the email field empty but I always get "Error=Failed to send email" when the field is empty. Is there a way to leave email empty?

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

    Question Re: Don't want to force entering an email address

    Hi,

    FormMail doesn't insist on having the sender's email address. If present, the email field is included in the "From" line in the message.

    The first step is to use the test mail script you can find here: http://www.tectite.com/vbforums/showthread.php?t=62

    It doesn't include a "From" line, so if it can send email on your server then FormMail will be able to send it too without the email field being filled in.

    There could be a couple of reasons why it's not working, so check if the test email script works, and we'll move forward from there.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  3. #3
    Join Date
    Apr 2004
    Posts
    10

    Cool Re: Don't want to force entering an email address

    Hi Russell


    First of all, it's Sunday. Get away from your computer for a while.

    Second, the script works except for when I use html mail. Here is the link to the html template: http://www.lantec.ca/wvpd/htmlmail/web_email.htm
    and here is the form: http://www.lantec.ca/wvpd/contact.htm
    (it looks nicer if you go to http://www.lantec.ca/wvpd/ and then click on "Contact Us")

  4. #4
    Join Date
    Dec 2003
    Posts
    3,901

    Lightbulb Re: Don't want to force entering an email address

    Hi,

    Thanks for being concerned about my Sunday. However, it's Monday where I live.

    Are you getting an Alert message with more details about the error (have you set DEF_ALERT)?

    I'm guessing that your server doesn't like sending email that has an empty From line. That would make some sense, even though other servers have no such issue.

    So, I've created a new version of FormMail which leaves the From line out completely if no email and no realname fields are present.

    I've attached it, so please try this version (2.10). If it doesn't solve the problem, then we'll have to keep working to figure out why you're getting this error from your server's PHP software.
    Attached Files
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  5. #5
    Join Date
    Apr 2004
    Posts
    10

    Default Re: Don't want to force entering an email address

    Looks like I was wrong about it only failing with html. It fails with plain text too.

    I tried the testmail.php and it worked so it's not a server issue.
    I don't have email in the required field.
    I upgraded formmail.php to v2.10 and still have the same problem.
    I do have DEF_ALERT on and this is what I get:
    The following error occurred in FormMail:
    mail_failed
    **********
    Error=Failed to send email

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

    Question Re: Don't want to force entering an email address

    Hi,

    If testmail.php sends you mail successfully, then your server is happy not to have a From line in the email. v2.10 should ensure you don't have a From line if both email and realname are empty.

    So, it's a mystery.

    Could you please email your form, template, and configured formmail.php to me at supportstaff AT tectite DOT com?

    I'll have a look and get back to you.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  7. #7
    Join Date
    Apr 2004
    Posts
    10

    Default Re: Don't want to force entering an email address

    I do have a value for realname but not for email. Is that the problem? If you have realname then you need email?

    What I want to do is have something in the from field so that the recipient can see at a glance where the email is from but I also want the submitter to remain anonymous if he or she chooses by not entering an email address.

    This is for the crimestoppers program. I want the tipster to remain anonymous but I also want the recipient to see right away that it is an email from the website so a blank From field is no good.

    It would also be nice to be able to set the priority to high on the email. Is that an option?
    Last edited by Goji; 22-Jun-2004 at 02:08 AM.

  8. #8
    Join Date
    Dec 2003
    Posts
    3,901

    Question Re: Don't want to force entering an email address

    Hi,

    If you have realname then you need email?
    That probably depends on the server software. With our servers we've tested with just email, with just realname, and with neither and all combinations work.

    If you just have realname, your server will see this in the email:
    From: (john smith)
    According to our reading of the standards (RFC822) this is not valid and that may be why your server is complaining. (However, other servers seem to work OK.) The usual case would be:
    From: johnsmith@smith.com (john smith)
    Try leaving the realname field out so you get no From line at all (with FormMail v2.10)

    If that works, we'll update FormMail so that the realname is only included if the email is too.

    If that doesn't work, then we need to take a closer look.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  9. #9
    Join Date
    Dec 2003
    Posts
    3,901

    Question Re: Don't want to force entering an email address

    Hi,

    It would also be nice to be able to set the priority to high on the email. Is that an option?
    There are at least two priority "fields" in use:
    Priority
    X-Priority
    Do you know which one you want and what the value(s) should be?
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  10. #10
    Join Date
    Apr 2004
    Posts
    10

    Default Re: Don't want to force entering an email address

    I just edited the form and took out the realname field and now it works. It looks like it's an issue with my server after all. My server is just a temporary location until I finish the site and then move it onto therir server. Hopefully it will work there or else I'll have to find an onsubmit script that checks to see if email has a value and then stick in a bogus address in if it doesn't.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

     

Similar Threads

  1. Conditions for a valid email address
    By bwv in forum FormMail Subscription Support
    Replies: 5
    Last Post: 04-Jul-2005, 09:24 PM
  2. Specify From Address
    By MBCMichaelB in forum FormMail Subscription Support
    Replies: 1
    Last Post: 15-Mar-2005, 09:18 PM
  3. email address field
    By darren777 in forum FormMail Subscription Support
    Replies: 4
    Last Post: 04-Mar-2005, 08:31 PM
  4. - Not a vaild char in email address
    By mdegan in forum FormMail Subscription Support
    Replies: 3
    Last Post: 02-Mar-2005, 06:02 AM
  5. User From Address
    By mdegan in forum FormMail Subscription Support
    Replies: 3
    Last Post: 02-Mar-2005, 01:35 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