f



Sendmail Configuration Problem

Hey everyone, I am having a problem with Sendmail for Perl. I have a web
page with five fields.

Four textbox fields are:
"fname" = From name
"femail" = From email
"tname" = To name
"temail"  = To email

1 textarea:
"contents" = Email contents

The script itself seems to be working fine. I input names and email
addresses in the "to" and "from" fields and add contents. The e-mail send
correctly and it gets to my inbox. When I open the e-mail in M$ Outlook,
instead of reading EG:

From: Robert (robert@email.com)
To: John (john@email.com)

It's reading this:

From Andy Raxin (andy@www1.hosting.com) on behalf of Robert
(robert@email.com)
To: John (john@email.com)

Notice the "on behalf" above. Sendmail is getting my own personal name and
email address from the hosting config and showing this as on behalf of what
I program in the Web page form fields. Here is a section of the email
header:

Date: Thu, 20 Nov 2003 17:39:15 -0800
From: Robert <robert@email.com>
Subject: Test Subject
Sender: Andy Raxin <andy@www1.hosting.com>
To: John <john@email.com>

Sendmail is attaching a "Sender" header to the email (as seen in line 3 of
the headers above), and Outlooks see's this and thus puts in the "on behalf"
in it's final message. I have been reading Sendmail manuals like crazy but
can't figure out a way to get rid of this "on behalf" thingy. I assume it
can be done because FormMail doesn't do this. FormMail uses the variables
"-t -i" and I use them too, to no avail. Can someobe help me? I do not want
my name and email address showing as the From on behalf, I want to show it
as being from who I enter into the Web page form fields. Here is my code:

#!/usr/bin/perl

use Fcntl qw(:DEFAULT :flock);
use CGI;
use CGI::Carp qw(fatalsToBrowser);

$mailprog="/usr/sbin/sendmail -t -i";
$fname = CGI::param('fname');
$femail = CGI::param('femail');
$tname = CGI::param('tname');
$temail = CGI::param('temail');
@contents = CGI::param('contents');

open (MAIL, "|$mailprog") or die "Can't open mail program: $!";
print MAIL "From: $fname <$femail>\n";
print MAIL "To: $tname <$temail>\n";
print MAIL "Subject: Test Subject\n";
print MAIL "MIME-Version: 1.0\n";
print MAIL "X-MSMail-Priority: $priority\n";
print MAIL "Content-Type: multipart/alternative;\n";
print MAIL "  boundary=\"separator\"\n\n";
print MAIL "This is a multi-part message in MIME format.\n\n";
print MAIL "--separator\n";
print MAIL "Content-Type: text/plain; charset=\"iso-8859-1\"\n";
print MAIL "Content-Transfer-Encoding: 7bit\n\n";
print MAIL "@contents\n\n";
print MAIL "--separator\n";
print MAIL "Content-Type: text/html; charset=\"iso-8859-1\"\n";
print MAIL "Content-Transfer-Encoding: 8bit\n\n";
print MAIL "<html>\n";
print MAIL "<head>\n";
print MAIL "</head>\n\n";
print MAIL "<body>\n\n";
print MAIL "@contents\n";
print MAIL "</body>\n";
print MAIL "</html>\n\n";
print MAIL "--separator--";
close (MAIL);

print "Content-type: text/html \n\n";
print "Mail sent";
exit;

Please and thank you to all who reply!!!!!

Andy



0
ducott_99 (8)
11/21/2003 2:09:34 AM
comp.mail.sendmail 13518 articles. 1 followers. jfretby (35) is leader. Post Follow

1 Replies
461 Views

Similar Articles

[PageSpeed] 51

In article <ytevb.445889$9l5.73923@pd7tw2no> "Robert TV"
<ducott_99@yahoo.com> writes:
>The script itself seems to be working fine. I input names and email
>addresses in the "to" and "from" fields and add contents. The e-mail send
>correctly and it gets to my inbox. When I open the e-mail in M$ Outlook,
>instead of reading EG:
>
>From: Robert (robert@email.com)
>To: John (john@email.com)
>
>It's reading this:
>
>From Andy Raxin (andy@www1.hosting.com) on behalf of Robert
>(robert@email.com)
>To: John (john@email.com)

That's just standard LookOut brokenness.

>Notice the "on behalf" above. Sendmail is getting my own personal name and
>email address from the hosting config and showing this as on behalf of what
>I program in the Web page form fields. Here is a section of the email
>header:
>
>Date: Thu, 20 Nov 2003 17:39:15 -0800
>From: Robert <robert@email.com>
>Subject: Test Subject
>Sender: Andy Raxin <andy@www1.hosting.com>
>To: John <john@email.com>
>
>Sendmail is attaching a "Sender" header to the email

No it isn't - something else is.

> (as seen in line 3 of
>the headers above), and Outlooks see's this and thus puts in the "on behalf"
>in it's final message. I have been reading Sendmail manuals like crazy but
>can't figure out a way to get rid of this "on behalf" thingy. I assume it
>can be done because FormMail doesn't do this. FormMail uses the variables
>"-t -i" and I use them too, to no avail. Can someobe help me? I do not want
>my name and email address showing as the From on behalf, I want to show it
>as being from who I enter into the Web page form fields. Here is my code:

Try specifying the envelope sender address via sendmail's -f option -
see the man page.

--Per Hedeland
per@hedeland.org
0
per71 (2634)
11/21/2003 8:39:27 PM
Reply:

Web resources about - Sendmail Configuration Problem - comp.mail.sendmail

Configuration file - Wikipedia, the free encyclopedia
In computing , configuration files , or config files configure the initial settings for some computer programs . They are used for user applications ...

Facebook Taps Opscode Private Chef For Configuration, Management Of Servers
How does Facebook manage its ever-growing plethora of servers , configurations, administrative access policies, and the other tasks that go along ...

Safe Gadget - Secure Your Computer and Smartphones with Easy to Follow Security Configuration Tips on ...
Get Safe Gadget - Secure Your Computer and Smartphones with Easy to Follow Security Configuration Tips on the App Store. See screenshots and ...

The Promise of System Configuration - YouTube
Google Tech Talks November 5, 2008 ABSTRACT In 1993 cfengine was one of the first open source configuration management systems for Unix, and ...

IBM: The PC is the new mainframe - Apple, Configuration / maintenance, Data Center, hardware systems ...
"The PC is dead!" We've heard that message a lot since the birth of Apple's iPad, but when one of the creators of IBM's first PC added his voice ...

Cloud BI vendor Birst bags $38 million in venture funding - SaaS, Configuration / maintenance, Birst ...
Birst, a San Francisco company that offers cloud-based business intelligence services, has scored a US$38 million venture investment led by existing ...

EMC teams with Avaya (not Cisco) on communication pods - unified communications, Configuration / maintenance ...
Two stalwarts in the enterprise IT market joined forces today to release a unified communications stack that integrates hardware from EMC, virtualization ...

Qualcomm Announces Snapdragon 820 Modem Configuration
... program. While we have some information about various bits and pieces of Snapdragon 820, the real points of interest like the exact CPU configuration, ...

All configurations of Nexus 6p back in stock at Google Store
... variants. Considering the fact the Nexus 6p hasn’t been on the market very long just yet, we wouldn’t be surprised if some of these configurations ...

Apple Watch launches in India with 40 available configurations, Hermes edition left out
Apple Watch hit store shelves in India on Friday with 40 different size, model and strap combinations available to consumers starting at 30,900 ...

Resources last updated: 3/25/2016 9:08:07 AM