Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar Mark Forums Read
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 04-30-2002, 06:57 AM   #1
hyper
Confirmed User
 
Join Date: Mar 2002
Location: Mass Ass
Posts: 5,294
Perl Guru's

i have a script that uses the print command to send out email

how do i modify it to print out html?

this is a sample

print MAIL "Hello,\n";
print MAIL " Thank you for joining $sitename:\n";
print MAIL "\n";
print MAIL " Your details are below:\n\n";

now i want to insert html below this and then resume the email
__________________
hyper is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-30-2002, 07:06 AM   #2
Babaganoosh
♥♥♥ Likes Hugs ♥♥♥
 
Babaganoosh's Avatar
 
Industry Role:
Join Date: Nov 2001
Location: /home
Posts: 15,841
The email will have to be sent in either HTML OR plain text. What you'll need to do to send email in HTML is find the line

print MAIL "Subject: WHATEVER \n\n";

and below it add

print MAIL "Content-type: text/html\n\n";

Make SURE you remove one of the newlines from the subject line so you end up with

print MAIL "Subject: WHATEVER \n";
print MAIL "Content-type: text/html\n\n";
__________________
I like pie.
Babaganoosh is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-30-2002, 07:07 AM   #3
hyper
Confirmed User
 
Join Date: Mar 2002
Location: Mass Ass
Posts: 5,294
thanks bro
__________________
hyper is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-30-2002, 08:58 AM   #4
hyper
Confirmed User
 
Join Date: Mar 2002
Location: Mass Ass
Posts: 5,294
i had to do it this way armed
i kept fucking with it till i got it

print MAIL "Content-type: text/html\n";
print MAIL "To: $emailok\n";
print MAIL "From: $adminmail\n";
print MAIL "Subject: $sitename\n\n";

i read the content type has to be the first thing sent

then i figured the to from and subject gotto go next

then the html
__________________
hyper is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-30-2002, 09:19 AM   #5
NetRodent
Confirmed User
 
Join Date: Jan 2002
Location: In the walls of your house.
Posts: 3,985
If you're going to be sending html emails you might want to consider reading up on mime encoding. Here's a sample message that contains a plain text section and an html section. Just make sure your boundry tag is something that would never occur in the text of either message.

-------------------------------------------------------------

Date: Mon, 29 Apr 2002 19:29:36 EDT
Subject: testing
To: [email protected]
From: [email protected]
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="part1_123456789.987654321_boundary"

--part1_123456789.987654321_boundary
Content-Type: text/plain; charset="US-ASCII"
Content-Transfer-Encoding: 7bit

This is the plain text message

--part1_123456789.987654321_boundary
Content-Type: text/html; charset="US-ASCII"
Content-Transfer-Encoding: 7bit

<HTML>
<H1>This is the HTML message</H1>
</HTML>

--part1_123456789.987654321_boundary--
NetRodent is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-30-2002, 10:40 AM   #6
hyper
Confirmed User
 
Join Date: Mar 2002
Location: Mass Ass
Posts: 5,294
geez that would take alot of work

would that even work with a perl generated email?
__________________
hyper is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-30-2002, 10:46 AM   #7
Babaganoosh
♥♥♥ Likes Hugs ♥♥♥
 
Babaganoosh's Avatar
 
Industry Role:
Join Date: Nov 2001
Location: /home
Posts: 15,841
It may, I don't understand the purpose of doing that though. To be honest, I have never fucked with it. In my line of work, there is no reason to send out a multipart email. I either send in text OR HTML. Not saying the other way won't work, just saying I have never done that.

Also, looks like your problem was the two newlines after the subject.

Had you done

print MAIL "Subject: WHATEVER \n";
print MAIL "Content-type: text/html\n\n";

It would have worked, but I suspect you left the two newlines in the subject line which would signify the end of the email header before the content type was specified.
__________________
I like pie.
Babaganoosh is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-30-2002, 10:50 AM   #8
hyper
Confirmed User
 
Join Date: Mar 2002
Location: Mass Ass
Posts: 5,294
yeah i tried it exactly like you said.
it didnt work

maybe it was the way the free script was wrote.
i'm just hacking it to send html mail
__________________
hyper is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks
Thread Tools



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.