Sponsored Content
Full Discussion: Email Form
Top Forums Web Development Email Form Post 302378350 by TonyLawrence on Monday 7th of December 2009 04:03:13 PM
Old 12-07-2009
You simply want a form that requests their information and then eother saves that in a file or emails it to you or does whatever else you want to do.

These things are trivial if you use Perl CGI.pm

For sending mail to myself or whomever, I like the Mail::Sendmail module because it lets me use simple HTMl.

Example of CGI.pm at 2005/01/25 CGI.pm

Example of Sendmail:

Code:
my %mail =   ( To      => $MailList,
              From    => $LdapUserEmail,
              Subject => $Subject,
              smtp => $taskglobals::smtp,
              'Content-Type' => 'text/html',
              'Content-Transfer-Encoding' => '8BIT',
              Message => $body
            );
sendmail(%mail) or print "ERROR sending mail\n";

 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Changing Unix form to Microsoft Word form to be able to email it to someone.

Please someone I need information on how to change a Unix form/document into a microsoft word document in order to be emailed to another company. Please help ASAP. Thankyou :confused: (8 Replies)
Discussion started by: Cheraunm
8 Replies

2. UNIX for Advanced & Expert Users

Unable to send eMail from a UNIX-Host ( using mailx ) to a Outlook-email-addres(Win)

Hi A) I am able to send eMail using mailx from a UNIX ( solaris 8 ) host to my Outlook-email-ID : FName.Surname@Citigroup.com ( This is NOT my actual -eMail-ID). But in Outlook the "From :" eMail address is displayed as " usr1@unix-host1.unregistered.email.citicorp.com " .i.e the words... (2 Replies)
Discussion started by: Vetrivela
2 Replies

3. Shell Programming and Scripting

Send email with attachment in form of excel in unix

Hi, I have a shell script which send email with an attachment in the form of an email. However, the when I open the attachment, all the data comes in one column. How do I format the data in the excel sheet while sending the email? Thanks (8 Replies)
Discussion started by: bdebroy
8 Replies

4. Solaris

Send an email from Solaris using Linux email server

Hello everyone I have a problem and I need your help: I have a Solaris 10 and Solaris 8 UNIX Servers, and Linux Centos4 as email server. I need send an email from Solaris servers preferably using Centos4 email server. I have no mail service configured in my Solaris computers (1 Reply)
Discussion started by: aflores
1 Replies

5. UNIX for Dummies Questions & Answers

new to ldap, send email to a ou or group, and see a list from email client

hi, i'm running openldap on ubuntu 10.04, creating new items with apache directory studio (windows version). i use the ldap just as an address book to our small office (email clients are windows live mail 2009, 2011, microsoft outlook 2007 and 2010). a. i cant see a list of the contacts,... (0 Replies)
Discussion started by: V4705
0 Replies

6. Shell Programming and Scripting

Using top command to email if process is exceeding 25% and sending an email alert if so

This is my first time writing a script and Im having some trouble, Im trying to use the top command to monitor processes and the amount of CPU usage they require, my aim is to get an email if a process takes over a certain percentage of CPU usage I tried grep Obviosly that hasnt worked, Any... (8 Replies)
Discussion started by: jay02
8 Replies

7. Shell Programming and Scripting

Transpose Data form Different form

HI Guys, I have data in File A.txt RL03 RL03_A_1 RL03_B_1 RL03_C_1 RL03 -119.8 -119.5 -119.5 RL07 RL07_A_1 RL07_B_1 RL07_C_1 RL07 -119.3 -119.5 -119.5 RL15 RL15_A_1 RL15_C_1 RL15 -120.5 -119.4 RL16... (2 Replies)
Discussion started by: asavaliya
2 Replies

8. Shell Programming and Scripting

Remove x lines form top and y lines form bottom using AWK?

How to remove x lines form top and y lines form bottom. This works, but like awk only cat file | head -n-y | awk 'NR>(x-1)' so remove last 3 lines and 5 firstcat file | head -n-3 | awk 'NR>4' (5 Replies)
Discussion started by: Jotne
5 Replies

9. Shell Programming and Scripting

Getting email output in single line with out space in email

I have tried below email method and i am getting every thing in single line . i have put echo to provide space, but it is not helping my code ( echo "From: $FROM" echo "To: $MAILTO" echo "CC: $CC" echo "Subject: $SUBJECT" echo "MIME-Version: 1.0" echo 'Content-Type: multipart/mixed;... (6 Replies)
Discussion started by: mirwasim
6 Replies
Email::Simple(3pm)					User Contributed Perl Documentation					Email::Simple(3pm)

NAME
Email::Simple - simple parsing of RFC2822 message format and headers SYNOPSIS
use Email::Simple; my $email = Email::Simple->new($text); my $from_header = $email->header("From"); my @received = $email->header("Received"); $email->header_set("From", 'Simon Cozens <simon@cpan.org>'); my $old_body = $email->body; $email->body_set("Hello world Simon"); print $email->as_string; ...or, to create a message from scratch... my $email = Email::Simple->create( header => [ From => 'casey@geeknest.com', To => 'drain@example.com', Subject => 'Message in a bottle', ], body => '...', ); $email->header_set( 'X-Content-Container' => 'bottle/glass' ); print $email->as_string; DESCRIPTION
"Email::Simple" is the first deliverable of the "Perl Email Project." The Email:: namespace was begun as a reaction against the increasing complexity and bugginess of Perl's existing email modules. "Email::*" modules are meant to be simple to use and to maintain, pared to the bone, fast, minimal in their external dependencies, and correct. METHODS
new my $email = Email::Simple->new($message, \%arg); This method parses an email from a scalar containing an RFC2822 formatted message and returns an object. $message may be a reference to a message string, in which case the string will be altered in place. This can result in significant memory savings. If you want to create a message from scratch, you should use the "create" method. Valid arguments are: header_class - the class used to create new header objects The named module is not 'require'-ed by Email::Simple! create my $email = Email::Simple->create(header => [ @headers ], body => '...'); This method is a constructor that creates an Email::Simple object from a set of named parameters. The "header" parameter's value is a list reference containing a set of headers to be created. The "body" parameter's value is a scalar value holding the contents of the message body. Line endings in the body will normalized to CRLF. If no "Date" header is specified, one will be provided for you based on the "gmtime" of the local machine. This is because the "Date" field is a required header and is a pain in the neck to create manually for every message. The "From" field is also a required header, but it is not provided for you. header_obj my $header = $email->header_obj; This method returns the object representing the email's header. For the interface for this object, see Email::Simple::Header. header_obj_set $email->header_obj_set($new_header_obj); This method substitutes the given new header object for the email's existing header object. header my @values = $email->header($header_name); my $first = $email->header($header_name); In list context, this returns every value for the named header. In scalar context, it returns the first value for the named header. header_set $email->header_set($field, $line1, $line2, ...); Sets the header to contain the given data. If you pass multiple lines in, you get multiple headers, and order is retained. If no values are given to set, the header will be removed from to the message entirely. header_names my @header_names = $email->header_names; This method returns the list of header names currently in the email object. These names can be passed to the "header" method one-at-a-time to get header values. You are guaranteed to get a set of headers that are unique. You are not guaranteed to get the headers in any order at all. For backwards compatibility, this method can also be called as headers. header_pairs my @headers = $email->header_pairs; This method returns a list of pairs describing the contents of the header. Every other value, starting with and including zeroth, is a header name and the value following it is the header value. body Returns the body text of the mail. body_set Sets the body text of the mail. as_string Returns the mail as a string, reconstructing the headers. crlf This method returns the type of newline used in the email. It is an accessor only. default_header_class This returns the class used, by default, for header objects, and is provided for subclassing. The default default is Email::Simple::Header. CAVEATS
Email::Simple handles only RFC2822 formatted messages. This means you cannot expect it to cope well as the only parser between you and the outside world, say for example when writing a mail filter for invocation from a .forward file (for this we recommend you use Email::Filter anyway). For more information on this issue please consult RT issue 2478, <http://rt.cpan.org/NoAuth/Bug.html?id=2478>. PERL EMAIL PROJECT
This module is maintained by the Perl Email Project <http://emailproject.perl.org/> AUTHORS
Simon Cozens originally wrote Email::Simple in 2003. Casey West took over maintenance in 2004, and Ricardo SIGNES took over maintenance in 2006. COPYRIGHT AND LICENSE
Copyright 2004 by Casey West Copyright 2003 by Simon Cozens This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2011-12-23 Email::Simple(3pm)
All times are GMT -4. The time now is 12:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy