Announcement

Collapse
No announcement yet.

Sending Emails using MivaScript

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Sending Emails using MivaScript

    I need to send HTML emails using Miva script, the following is from this page: https://www.miva.com/docs-html/Scrip...Rec_Email.html


    <MvSMTP
    TO="to_address1,to_address2,..."
    SUBJECT="expression"
    CC="cc_address1,cc_address2,..."
    MAILHOST="mailhost"
    FROM="from_address">
    [optional headers]
    [blank line]
    ... message body (text/tags)...
    </MvSMTP>

    I have tried many different ways to code this like:
    <MvSMTP
    MAILHOST = "{g.mailhost}"
    FROM = "{g.mail_from}"
    TO = "{g.mail_to}"
    CC = "{g.mail_cc}"
    SUBJECT = "{g.mail_subj}">
    HEADERS = "Content-type:text/html;charset=iso-8859-1"

    <MvEVAL EXPRESSION = "{l.lfcr}">
    <MvEVAL EXPRESSION = "{g.mail_body}">
    <MvEVAL EXPRESSION = "{l.lfcr}">
    </MvSMTP>

    I don’t know if "Content-type:text/html;charset=iso-8859-1" is correct or my code is incorrect?
    I got the code from: https://stackoverflow.com/questions/...email-with-php

    Thanks in advance!
    Robin
    Last edited by robinemcd; 02-05-23, 03:11 AM.
    ---------------------------------
    Robin McDermott, CQE
    Director of Training
    QualityTrainingPortal.com

    #2
    The headers are not put into an attribute called HEADERS. Each one is individually placed after the closing '>' character of the opening MvSMTP tag.

    So where you have HEADERS = instead should be:
    <MvEVAL EXPR = "{ 'Content-type:text/html;charset="iso-8859-1"' $ l.crlf }"

    Always end every line with carriage return+line feed. I seem to remember that if you reverse the order like you show, some servers will have problems.

    I also like to use utf-8 instead of iso-8859-1.
    Gordon Currie
    Phosphor Media - "Your Success is our Business"

    Improve Your Customer Service | Get MORE Customers | Edit Any Document Easily | Free Modules | Follow Us on Facebook
    phosphormedia.com

    Comment


      #3
      Thank you so much Gordon. This is exactly what we needed.
      ---------------------------------
      Robin McDermott, CQE
      Director of Training
      QualityTrainingPortal.com

      Comment

      Working...
      X