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

Thread: Getting "Your TARGET_EMAIL pattern "^[-a-z0-9.]+" is missing a $ at the end" notices

  1. #1
    Join Date
    Oct 2008
    Posts
    7

    Default Getting "Your TARGET_EMAIL pattern "^[-a-z0-9.]+" is missing a $ at the end" notices

    I have left following at the recommended default setting:

    define("EMAIL_NAME","^[-a-z0-9.]+");

    I have changed the target mail as:

    $TARGET_EMAIL = array(EMAIL_NAME,"^me@myDomainName\.com$");

    There is a working address where it says above me@myDomainName\.com$

    I am getting following errors:
    The following potential problems were found in your configuration:
    Warning: Your TARGET_EMAIL pattern "^[-a-z0-9.]+" is missing a $ at the end.

    Can someone enlighten me where this $ should go exactly?

    Also, the 8.05 version has a period after EMAIL_NAME when it should be a comma:
    $TARGET_EMAIL = array(EMAIL_NAME."@yourhost\.com$");

    Took me ages to track it down. I kept getting no_valid_recipients errors.

    Thanks in advance.

  2. #2
    Join Date
    May 2008
    Posts
    1,291

    Default Re: Getting "Your TARGET_EMAIL pattern "^[-a-z0-9.]+" is missing a $ at the end" noti

    Hi,

    $TARGET_EMAIL = array(EMAIL_NAME,^me@myDomainName\.com$);
    This should be:

    Code:
    $TARGET_EMAIL = array("^me@myDomainName\.com$");
    if you only want to allow mail to that specific address . . . OR . . .

    Code:
    $TARGET_EMAIL = array(EMAIL_NAME."@myDomainName\.com$");
    if you want to allow mail to ANY address at myDomainName.com.

    Also, v8.05 is correct. It should be a period in the $TARGET_EMAIL setting when concatenating (joining) EMAIL_NAME with your domain name. Maybe you're confusing it with the define(EMAIL_NAME ...) setting.

    ginger

  3. #3
    Join Date
    Oct 2008
    Posts
    7

    Default Re: Getting "Your TARGET_EMAIL pattern "^[-a-z0-9.]+" is missing a $ at the end" noti

    Quote Originally Posted by ginger23 View Post
    Hi,



    This should be:

    Code:
    $TARGET_EMAIL = array("^me@myDomainName\.com$");
    if you only want to allow mail to that specific address . . . OR . . .

    Code:
    $TARGET_EMAIL = array(EMAIL_NAME."@myDomainName\.com$");
    if you want to allow mail to ANY address at myDomainName.com.

    Also, v8.05 is correct. It should be a period in the $TARGET_EMAIL setting when concatenating (joining) EMAIL_NAME with your domain name. Maybe you're confusing it with the define(EMAIL_NAME ...) setting.

    ginger
    Hi -- not sure why the quotes aren't around the email address in your quoted text but are in my original post. So, that is not the problem because the original matches your suggestion. Something else is causing the error.

    Also, if I do NOT change the period for $TARGET_EMAIL after EMAIL_NAME, I get the no valid recipient error. Changing it to a comma, as per version 8.03, fixes the error. Here is a copy paste from the download:
    $TARGET_EMAIL = array(EMAIL_NAME."@yourhost\.com$");

    Note the period (marked in red here). Changing it to:
    $TARGET_EMAIL = array(EMAIL_NAME,"^me@myDomainName\.com$");
    Fixes error.

    Thanks.

  4. #4
    Join Date
    May 2008
    Posts
    1,291

    Default Re: Getting "Your TARGET_EMAIL pattern "^[-a-z0-9.]+" is missing a $ at the end" noti

    Hi,

    I'm not sure why the quotes aren't there either, but that's not the issue. What I posted isn't the same as what you have. You have the entire email address in there, where as I just have the domain name when using EMAIL_NAME in the TARGET_EMAIL setting, which is when you want to allow ANYONE at that domain to be able to receive emails from the form.

    Look at it again and try it out.

    ginger

  5. #5
    Join Date
    Oct 2008
    Posts
    7

    Default Re: Getting "Your TARGET_EMAIL pattern "^[-a-z0-9.]+" is missing a $ at the end" noti

    I was referring to your first suggestion, which is exactly what I have (see my original post). Your second suggestion is for receiving emails by anyone but I don't want to set that option. I want to specify someone at the domain name, which I have done and followed documentation by adding a ^ at the front and a $ at the end:
    $TARGET_EMAIL = array(EMAIL_NAME,"^me@myDomainName\.com$");

    Going back to my problem, why am I getting the "Warning: Your TARGET_EMAIL pattern "^[-a-z0-9.]+" is missing a $ at the end."

    The documentation says I can leave this at the default setting, which is what I have done.

  6. #6
    Join Date
    May 2008
    Posts
    1,291

    Default Re: Getting "Your TARGET_EMAIL pattern "^[-a-z0-9.]+" is missing a $ at the end" noti

    Quote Originally Posted by wal.rus View Post
    I was referring to your first suggestion, which is exactly what I have (see my original post).
    So am I, and it's NOT exactly what you have.

    I don't know why you're getting that error other than your $TARGET_EMAIL setting isn't right. If you look closely at what I wrote (my first suggestion) you'll see that it's different.

    HINT: My first suggestion does NOT have EMAIL_NAME in it.

    ginger
    Last edited by ginger23; 14-Oct-2008 at 06:13 PM.

  7. #7
    Join Date
    Oct 2008
    Posts
    7

    Default Re: Getting "Your TARGET_EMAIL pattern "^[-a-z0-9.]+" is missing a $ at the end" noti

    Quote Originally Posted by ginger23 View Post
    So am I, and it's NOT exactly what you have.

    HINT: My first suggestion does NOT have EMAIL_NAME in it.

    ginger
    The hint put me on the same page. However, according to http://www.tectite.com/fmdoc/target_email.php I have set it up correctly, except in the examples EMAIL_NAME. has a period, instead of a comma. Period fails with a recipient not defined error; changing it to EMAIL_NAME, fixed the problem.

    Removing EMAIL_NAME as per your suggestion stopped the "missing a $" error warnings.

    Thanks for your help. Much appreciated.

  8. #8
    Join Date
    May 2008
    Posts
    1,291

    Default Re: Getting "Your TARGET_EMAIL pattern "^[-a-z0-9.]+" is missing a $ at the end" noti

    Hi,

    You're welcome. Glad it's working.

    I think you misread the documentation, and just so you (and others) understand; there are 2 ways to specify TARGET_EMAIL, one is with a "specific email address" and the other is to specify "any email address" at a specific domain. What you have in the following is not what's shown in the documentation. You have a combination of BOTH methods. EMAIL_NAME is a "placeholder" for the name part of an email address, then it's followed by a domain name. That method (using EMAIL_NAME) is when you want to allow any person at a specific domain (and it's "joined" with the domain name by that period). If you want only a specific person or persons to be able to receive email from your form, then you specify the "exact address" without EMAIL_NAME.

    This is what you had:
    Quote Originally Posted by wal.rus View Post
    $TARGET_EMAIL = array(EMAIL_NAME,"^me@myDomainName\.com$");
    These are the documented ways:
    $TARGET_EMAIL = array(EMAIL_NAME."@rootsoftware\.com$");
    ...OR...
    $TARGET_EMAIL = array("^russ-robinson@rootsoftware\.com$");
    You said:
    I have set it up correctly, except in the examples EMAIL_NAME. has a period, instead of a comma.
    You can see the differences by looking (closely) at the examples above.

    Period fails with a recipient not defined error; changing it to EMAIL_NAME, fixed the problem.
    But you just got a different error because the statement still wasn't correct. You still had EMAIL_NAME in the code when it shouldn't have been, it's just that EMAIL_NAME was no longer "joined" (by the period) to the rest of the full email address, which it shouldn't have been.

    I'm running version 8.05 with the period (not a comma) and get no errors that you reported. If you believe that there's a bug in the script, however, you should post it in the Bugs forum down below, and Russell will take a look.

    ginger

  9. #9
    Join Date
    Oct 2008
    Posts
    7

    Default Re: Getting "Your TARGET_EMAIL pattern "^[-a-z0-9.]+" is missing a $ at the end" noti

    What confused me was thinking I had to leave "EMAIL_NAME." in place when it's a place holder. Doh! Your explanation was easier to understand for a non-PHP savvy person than the one on the help page.

    This is the form I used in the end:
    $TARGET_EMAIL = array("^me@someDomainName\.com$");

    All's well that ends well!

  10. #10
    Join Date
    May 2008
    Posts
    1,291

    Default Re: Getting "Your TARGET_EMAIL pattern "^[-a-z0-9.]+" is missing a $ at the end" noti

    Quote Originally Posted by wal.rus View Post
    All's well that ends well!
    Absolutely! Glad the explanation helped.

    ginger

+ 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. Creating mail object using Mail::factory ("smtp", ....) and FormMail
    By stingray in forum FormMail Subscription Support
    Replies: 1
    Last Post: 13-Jul-2004, 09:27 PM
  2. No "Sender" of the email
    By lemonade in forum FormMail Subscription Support
    Replies: 1
    Last Post: 28-Jun-2004, 08:11 PM
  3. "Internal Server Error": What'd I do wrong?
    By sgodun in forum FormMail Subscription Support
    Replies: 4
    Last Post: 16-May-2004, 12:01 AM
  4. Spiders and "The form has an internal error"
    By russellr in forum FormMail Subscription Support
    Replies: 0
    Last Post: 13-May-2004, 09:11 PM
  5. Email contains no "mesg"
    By xuric in forum FormMail Subscription Support
    Replies: 1
    Last Post: 19-Apr-2004, 08:17 PM

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