+ Reply to Thread
Results 1 to 10 of 10

Thread: HTMLMessage

  1. #1
    Join Date
    Oct 2004
    Posts
    21

    Default HTMLMessage

    Hi Russell,

    Me again! I am stuck with the HTMLMessage side. I am pretty sure I have it right - I know it finds the template (I get an error if it's not there) but it won't format the message. I have even tried pointing HTMLTemplate to the good template (which I know works) but that doesn't work either. I have read the how to and can't spot where I am wrong.

    I have attached the two files I am using.

    Nick
    Attached Files

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

    Default Re: HTMLMessage

    Hi,

    I guess you're seeing the whole template in the email except the $subject field.

    Is that correct?

    If so, then in atestemail.asp the subject field is called "ssnstrSubject" but in SendMail.asp you seem to have referred to it as "strSubject". Shouldn't the names be the same?
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  3. #3
    Join Date
    Oct 2004
    Posts
    21

    Default Re: HTMLMessage

    Hi Russelle,

    No - I set thet strsubject in the javascript file checkmail.js (which I can forward as well if it helps). The reason for doing it that way is I want the kids to be able to send to a 'hidden' address I supply from the databse and alternatively addresses they can supply themselves.

    I have forwarded the sending and receiving pages separately. You can see that success.html works fine as you can see.

    Nick

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

    Default Re: HTMLMessage

    Hi,

    I'll need to see this in action. There are two many software systems (JS, ASP, HTML) in play to know whether FormMail actually gets to see a "subject" field submitted.

    Please send me the URL for the form.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  5. #5
    Join Date
    Oct 2004
    Posts
    21

    Default Re: HTMLMessage

    OK Russell - it will be tomorrow now as I only have it on my local server and will need to shift it up.

    will be back later.

    Nick

  6. #6
    Join Date
    Oct 2004
    Posts
    21

    Default Re: HTMLMessage

    This is the message I receive instead of the HTMLTemplate file (message.html)
    Date: 07:42 11th Oct 2004
    From: httpd <httpd@ns.ogbourne.co.uk>
    To: WebManager@toolangirolemodelprogram.asn.au
    Subject: For role model message
    email:
    realname:
    toEmailUser: WebManager
    toEmailAddress: toolangirolemodelprogram.asn.au
    toChkEmailUser: WebManager
    toChkEmailAddress: toolangirolemodelprogram.asn.au
    fromEmailName: Nick
    fromEmailUser: nick
    fromEmailAddress: toolangirolemodelprogram.asn.au
    fromChkEmailUser: nick
    fromChkEmailAddress: toolangirolemodelprogram.asn.au
    msgEmail: Hello
    msgbox: Please complete the form.
    sndEMail: Send It

    And this is what I received at the senders end.,

    We have received your email

    Thanks for e-mailing us.

    Here is the information you submitted:

    Subject: For role model message RecipientsWebManager@toolangirolemod...e=message.html,TemplateMissing=N/A

  7. #7
    Join Date
    Dec 2003
    Posts
    3,900

    Default Re: HTMLMessage

    Hi,

    Sorry. I misunderstood. I thought you were saying that the template is being processed but some fields are not being substituted.

    What you're saying is that the HTML template is no being processed at all.

    Is that correct?
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

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

    Default Re: HTMLMessage

    Hi,

    If the template isn't being used, then there are a small number of possibilities:
    1. You haven't set $TEMPLATEDIR or $TEMPLATEURL in FormMail.
    2. You have set one of them and the path is wrong.
    3. The path is right, but the template file is not readable by the web server process.
    In all cases, you will get an Alert message from FormMail to say what's wrong.

    Do you know whether you can receive Alert messages?

    You can test with: http://www.yoursite.com/formmail.php?testalert=1

    Another thing to check is that just before your form is submitted to FormMail, right-click to view the source of the Form. Check that the hidden fields are, in fact, set.

    Also, ensure that any JavaScript you have isn't emptying fields before they are submitted.

    Use our sample form to test your setup before trying to get complex forms running. A sample form quickly tests whether you have everything setup correctly. If it works and your complex form doesn't, then you know where to look.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

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

    Thumbs up Re: HTMLMessage

    Hi,

    I've submitted a form and looked at the resulting email with the passwords you sent me.

    It's all working fine.

    In your webmail interface, you'll see several "View email as" buttons.

    It defaults to the Text version, but if you click the HTML button, you can see your HTML template filled in correctly by FormMail.

    You can tell FormMail not to include a plain text version in the email. If you don't want it, just add the NoPlain option to mail_options.

    Code:
    <input type='hidden' 
    	  name='mail_options' 
    	  id = 'mail_options' 		
    	  value="HTMLTemplate=message.html,TemplateMissing=N/A,NoPlain"
    	/>
    BTW, I recommend conforming to the XHTML standard. In particular, you should use double-quotes not single quotes in HTML tags.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  10. #10
    Join Date
    Oct 2004
    Posts
    21

    Default That's it. Thanks

    Hi Russell,
    That's it! All OK now - I will add a text only template rather than delete the plain text.
    And thanks foir the tip. I am not sure why I slected the ' rather than " as my editor (TopStyle) offers the " as default.

    Thanks for all the help and I will let you know when the site is operational.
    I would always welcome any criticisms of it.
    Nick

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

     

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