nixCraft Linux Forum

nixCraft

Linux / UNIX Tech Support Forum

Perl simple html mail

This is a discussion on Perl simple html mail within the Coding in General forums, part of the Development/Scripting category; How do I send simple html mail using Perl script? TIA...


Go Back   nixCraft Linux Forum > Development/Scripting > Coding in General

Linux answers from nixCraft.


Coding in General Discussion on PHP/Perl/Python/Ruby/GNU C or C++. MySQL, PgSQL and (X)HTML or any other programming languages you want.

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 16-01-2007, 04:25 PM
chiku's Avatar
Member
User
 
Join Date: Feb 2005
OS: Fedora
Posts: 86
Thanks: 10
Thanked 0 Times in 0 Posts
Rep Power: 0
chiku is on a distinguished road
Default Perl simple html mail

How do I send simple html mail using Perl script?

TIA
__________________
There's no place like 127.0.0.1
Reply With Quote
  #2 (permalink)  
Old 16-01-2007, 09:02 PM
raj's Avatar
raj raj is offline
Senior Member
User
 
Join Date: Jun 2005
Location: Hyderabad
OS: Fedora, Debian Linux
Posts: 307
Thanks: 42
Thanked 8 Times in 8 Posts
Rep Power: 6
raj will become famous soon enough raj will become famous soon enough
Default

quite easy read How do I send html email from Perl How do I send html email from Perl | Frequently Asked Questions

babai
__________________
Raj
Linux rulz.
I have never turned back in my life ; I shall not do so today.. haha
Reply With Quote
  #3 (permalink)  
Old 16-08-2007, 04:37 PM
Junior Member
User
 
Join Date: Jul 2007
Location: Cedar Falls, IA
OS: Fedora
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
A.L.E.X is on a distinguished road
Default

what if I want to send a full html page ?

PHP Code:
#!/usr/bin/perl -w
use strict;
use 
MIME::Lite;

# SendTo email id
my $email ‘user@somewhere.com’;

# create a new MIME Lite based email
my $msg MIME::Lite->new
(
Subject => “HTML email test”,
From    => ‘YOU@somewhere.com’,
To      => $email,
Type    => ‘text/html’,
Data    => <H1>Hello</H1><br>This is a test email.
Please visit our site <a href=”http://cyberciti.biz/”>online</a><hr>’
);
$msg->send(); 
in the above example, Data value is short .. what I'm trying to do is sending a full html page using the above example.

Thanks,
Reply With Quote
  #4 (permalink)  
Old 17-08-2007, 07:59 PM
raj's Avatar
raj raj is offline
Senior Member
User
 
Join Date: Jun 2005
Location: Hyderabad
OS: Fedora, Debian Linux
Posts: 307
Thanks: 42
Thanked 8 Times in 8 Posts
Rep Power: 6
raj will become famous soon enough raj will become famous soon enough
Default

I guess you can use full HTML page w/o a problem
__________________
Raj
Linux rulz.
I have never turned back in my life ; I shall not do so today.. haha
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
Script to strip all slack from php, html, js meowing Shell scripting 4 03-05-2008 02:37 AM
Simple ipcalc perl script unixfoo Shell scripting 0 24-01-2008 06:59 PM
Simple Xen API programming unixfoo XEN 0 28-12-2007 11:00 AM
HTML variable nathan86 Linux software 3 23-03-2005 12:29 PM
HTML Program cannot open in cgi-bin folder sonaikar Linux software 5 04-02-2005 04:45 PM


All times are GMT +5.5. The time now is 07:02 PM.


Powered by vBulletin® Version 3.8.5 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2010 nixCraft. All rights reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38