LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-12-2010, 01:38 AM   #1
mulochzen
LQ Newbie
 
Registered: Apr 2010
Posts: 5

Rep: Reputation: 0
<Mail From> header not working PHPMailer with SMTP


Installing PHPMailer v.5 (server running php5) with SMTP function. I have installed the main files in mail directory such as:

# class.phpmailer.php: This is the main class file which contains the various email functions.
# class.smtp.php: This additional class allows SMTP authentication.

I don't think I need class.pop3.php as I'm sending mails server side (smtp)and should be accepted by most IP's pop3 servers.

All my mail functions work great with SMTP and I can send and receive. My problem is that my recipients only receive mail from admin@domain instead of "My Website Name" Sounds simple enough, I know and I have made adjustments to class.phpmailer.php and have inserted my specific mail attributes for my site such as mail address, mail from, smtp server, user/pass for smtp,etc.

PHP Mailer v5.0 class.phpmailer.php is a very long script and I only found a couple of places to put the FROM address as follows:

PROPERTIES,

PUBLIC
/////////////////////////////////////////////////

/**
*

Email priority (1 = High, 3 = Normal, 5 = low).
* @var

int
*/
public $Priority = 3;

/**
* Sets the

CharSet of the message.
* @var string
*/
public

$CharSet = 'iso-8859-1';

/**
* Sets the

Content-type of the message.
* @var string
*/


public $ContentType = 'text/plain';

/**
* Sets the

Encoding of the message. Options for this are
*

"8bit", "7bit", "binary", "base64", and "quoted-

printable".
* @var string
*/
public $Encoding

= '8bit';

/**
* Holds the most recent mailer error

message.
* @var string
*/
public $ErrorInfo =

'';

/**
* Sets the From email address for the

message.
* @var string
*/
public $From =

'EMAIL@DOMAIN.com';

/**
* Sets the From name of

the message.
* @var string
*/
public $FromName

= 'MY WEBSITE NAME HERE';

/**
* Sets the

Sender email (Return-Path) of the message. If not

empty,
* will be sent via -f to sendmail or as 'MAIL

FROM' in smtp mode.
* @var string
*/
public

$Sender = ''; <THIS SPOT IS NOT WORKING FOR ME EITHER

/**

If anybody has a copy of the script version5, let me know if I'm missing something here.
 
Old 04-12-2010, 04:47 AM   #2
mulochzen
LQ Newbie
 
Registered: Apr 2010
Posts: 5

Original Poster
Rep: Reputation: 0
Fixed.

The third party software I was using had utilized phpmailer on it's backend so there was some tweaking of the script on the developers side and the standard install instructions did not fully apply. What was needed here was simply a "Website <email@domain>" variable to make my version work.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
can i use a from header to use the $mail command dsids Linux - Newbie 1 10-19-2006 05:39 PM
Unable to send mail to some mail servers due smtp greetings malformed atotomex Linux - Networking 6 12-20-2005 04:38 PM
Cron mail sending using outside SMTP mail server Utah Linux - Software 6 08-24-2005 07:44 PM
SMTP Header jonlake Linux - Networking 1 05-06-2005 03:00 AM
SMTP and KMail and SMTP and Netscape Mail jazz... Linux - Newbie 5 10-11-2003 03:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration