Results 1 to 2 of 2
Related
-
Sending email via Perl through MS Exchange Server Forum: CGI Perl Forum
Replies: 5 -
How to email a HTML url in Perl Forum: CGI Perl Forum
Replies: 0 -
How to post a variable from HTML to perl and from perl to HTML Forum: CGI Perl Forum
Replies: 1 -
How to post a variable from HTML to perl and from perl to HTML Forum: Website Scripts Forum
Replies: 0
-
11-21-2006, 12:06 AM #1
Trying to create an html Email in Perl
I have an existing shopping cart writting in perl where we Email a text message confirming the order. We want to change it to a html message confirmation. The problem I am having is that the html code is not being executed in the Email, but is displaying the code.
Instead of getting :
<div><head><title>
The code is being converted to:
<div><head><title>
Therefore the shopper get html code instead of an executed html Email message. I don't know if I need to add flags to the sendmail (right now just -t), or I need to add a meta tag, or what. Help.
The Email program we are starting with is Eudora Pro. We know that Eudora can do it, because our competitor send us a Email confirmation that did work, and the symbols < and > are not converted.
-
11-23-2006, 01:21 AM #2
Re: Trying to create an html Email in Perl
time for some webstuff 101...
every page has a mime type associated with it...
for example... if you go to a page like:
http://www.google.com
it prints the following headers...
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html; charset=UTF-8
Content-Encoding: gzip
Server: GWS/2.1
Content-Length: 2034
Date: Thu, 23 Nov 2006 06:12:42 GMT
these headers tell the browser what it needs to know... the main thing you need to be looking at is:
Content-Type: text/html;
that header is the single most important thing to the browser, because it tells it that it needs to display the content as an html page... however... have you ever been to a site that is plain text? such as:
http://www.google.com/robots.txt
this page outputs the following headers:
HTTP/1.1 200 OK
Content-Type: text/plain
Last-Modified: Thu, 09 Nov 2006 22:49:53 GMT
Content-Encoding: gzip
Server: GWS/2.1
Cache-Control: private, x-gzip-ok=""
Content-Length: 616
Date: Thu, 23 Nov 2006 06:17:51 GMT
notice how it's content-type is different? and notice how the page is not displayed as an html page would be?
in short emails act much the same way as webpages do...
if you want to send a plain text mail the header:
Content-Type: text/plain
if you want to send an HTML email you need to send atleast:
Content-Type: text/html
but preferably:
Content-Type: text/html; charset=UTF-8
that should explain it...
if you post your email section code i can help fix it up,
-ALL
Cloudjiffy- PaaS for Developers
10-05-2020, 12:30 AM in Web Hosting Forum