Tadashi Okoshi
slash****@users*****
2005年 11月 18日 (金) 20:14:05 JST
Index: affelio/lib/Affelio/NetLib/Email.pm
diff -u affelio/lib/Affelio/NetLib/Email.pm:1.7 affelio/lib/Affelio/NetLib/Email.pm:1.8
--- affelio/lib/Affelio/NetLib/Email.pm:1.7 Fri Nov 18 20:06:21 2005
+++ affelio/lib/Affelio/NetLib/Email.pm Fri Nov 18 20:14:05 2005
@@ -14,7 +14,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
-# $Id: Email.pm,v 1.7 2005/11/18 11:06:21 slash5234 Exp $
+# $Id: Email.pm,v 1.8 2005/11/18 11:14:05 slash5234 Exp $
package Affelio::NetLib::Email;
{
@@ -33,7 +33,8 @@
########################################################################
sub send_email{
my $sendmail_path = shift;
- my $from = shift;
+ my $from_addr = shift;
+ my $from_name = shift;
my $to = shift;
my $subject = shift;
my $body = shift;
@@ -41,16 +42,15 @@
my $eol = "";
my $subject_b = MIME::Base64::Perl::encode_base64($subject, $eol);
$subject_b = "=?utf-8?B?" . $subject_b . "?=";
- my $headers = "From:$from\nMIME-Version: 1.0\nContent-Type: text/plain; charset=utf-8\nContent-Transfer-Encoding: base64\n";
+ my $headers = "From: $from_name <$from_addr>\nMIME-Version: 1.0\nContent-Type: text/plain; charset=utf-8\nContent-Transfer-Encoding: base64\n";
my $body_b = MIME::Base64::Perl::encode_base64($body);
###########################################
Affelio::misc::Debug::debug_print("send_mail_ack: $sendmail_path -t\n");
#Sendmail
- open(MAIL, " | $sendmail_path -tf $from ");
+ open(MAIL, " | $sendmail_path -tf $from_addr ");
print MAIL $headers;
print MAIL "To: $to\n";
- print MAIL "From: $from\n";
print MAIL "Subject: $subject_b\n\n";
print MAIL "$body\n";
print MAIL "\n";