Search The ForumSearch   RegisterRegister  LoginLogin

AfterLogic WebMail Pro

 AfterLogic Forum : AfterLogic WebMail Pro
Subject Topic: option to send by SMTP or sendMail PHP Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
chapulin
Newbie
Newbie


Joined: 22 August 2006
Online Status: Offline
Posts: 11
Posted: 22 August 2006 at 9:02pm | IP Logged Quote chapulin

Hello.

Its posible add a new feature to MailBee WebMail PHP?

The option to select if the message is send using SMTP configuration or the sendMail Function of PHP.

Where need modificate to change the configuration and the messages send using the senMail PHP function?

and maybe in a future the option to use MySQL in backend or flat txt file to store user profile (identity)?

thank's
Back to Top View chapulin's Profile Search for other posts by chapulin
 
Andrew
AfterLogic Support
AfterLogic Support


Joined: 28 April 2006
Location: United States
Online Status: Offline
Posts: 1189
Posted: 23 August 2006 at 10:47am | IP Logged Quote Andrew

Quote:

Where need modificate to change the configuration and the messages send using the senMail PHP function?


If you want mails being sent through SendMail instead of sending via Send function of MailBee WebMail PHP, please replace the line 795 of WebMail PHP code in "functions.php" file:

Code:

$er = $smtp->Send();

with something like this:
Code:

mail($_REQUEST['str_to'].','.$_REQUEST['str_cc'].','.$_REQUEST['str_bcc'], $_REQUEST['str_subject'], $smtp->data);


Please note, this instruction is valid only for the current MailBee WebMail PHP version (2.0.0.10). In future versions the line number can be changed.

Quote:

and maybe in a future the option to use MySQL in backend or flat txt file to store user profile (identity)?


MailBee WebMail PHP Pro version with database support will be released in a few months. Anyway, you are allowed to modify WebMail source code and implement any feature you need.

Best regards,
Andrew
Back to Top View Andrew's Profile Search for other posts by Andrew
 
chapulin
Newbie
Newbie


Joined: 22 August 2006
Online Status: Offline
Posts: 11
Posted: 24 August 2006 at 9:45am | IP Logged Quote chapulin

Hello, I'm modificate the source but a red box appears with error:

Error without description

but the email send, and when arrive and open the mail like these (I', change the mail with demo word):

----------------
Code:

From: demo@demo.com
Reply-To: demo@demo.com
Errors-To: demo@demo.com
To: demo@demo.com
Subject: =?utf-8?Q?somesubject?=
Date: Thu, 24 Aug 2006 08:26:46 -0500
X-Priority: 3 (Normal)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

some content of message here

-----------------------

and the code:

Code:

$er = $smtp->Send();


is not in the 795 line, i'm downloaded the last version and is in the 783 line.

now my source like these:

Code:

782  $smtp->FormData();
783  mail($_REQUEST['str_to'].','.$_REQUEST['str_cc'].','.$_REQUEST['str_bcc'], $_REQUEST['str_subject'], $smtp->data);
784  if ($er == false) $dom->AddError($data, $smtp->smtp_error);
785  return $dom->SaveDomXml();


I'm make some error?

thank's
Back to Top View chapulin's Profile Search for other posts by chapulin
 
Andrew
AfterLogic Support
AfterLogic Support


Joined: 28 April 2006
Location: United States
Online Status: Offline
Posts: 1189
Posted: 24 August 2006 at 10:24am | IP Logged Quote Andrew

Looks like the error is caused by line 784 of your code:
Code:

if ($er == false) $dom->AddError($data, $smtp->smtp_error);


Thus, could you please delete/comment this line and try to send the message again?


Best regards,
Andrew
Back to Top View Andrew's Profile Search for other posts by Andrew
 
chapulin
Newbie
Newbie


Joined: 22 August 2006
Online Status: Offline
Posts: 11
Posted: 24 August 2006 at 2:50pm | IP Logged Quote chapulin

hello.

yeah, the error not appears more, but the email send by the default address put when installing the php, and not where I'm loged and in the body of the message arrive that:

Code:

From: demo@demo.com
Reply-To: demo@demo.com
Errors-To: demo@demo.com
To: demo@demo.com
Subject: =?utf-8?Q?somesubject?=
Date: Thu, 24 Aug 2006 13:50:32 -0500
X-Priority: 3 (Normal)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

some content of message here


when the normail is that arrive that:

Code:

some content of message here




is not very important to send by the route of the sendMail function of PHP but, I'm liked can send usig that
Back to Top View chapulin's Profile Search for other posts by chapulin
 
Andrew
AfterLogic Support
AfterLogic Support


Joined: 28 April 2006
Location: United States
Online Status: Offline
Posts: 1189
Posted: 25 August 2006 at 7:44am | IP Logged Quote Andrew

Could you please replace line 783 of "functions.php" file:
Code:

mail($_REQUEST['str_to'].','.$_REQUEST['str_cc'].','.$_REQUEST['str_bcc'], $_REQUEST['str_subject'], $smtp->data);

with
Code:

mail($_REQUEST['str_to'].','.$_REQUEST['str_cc'].','.$_REQUEST['str_bcc'], $_REQUEST['str_subject'], $_REQUEST['message']);


After this change, the headers should not be inserted into the message body. Please let us know how it works.

Quote:

yeah, the error not appears more, but the email send by the default address put when installing the php, and not where I'm loged


In PHP, mail function sends all the messages from the address specified in php.ini, it cannot be changed on the fly. You can learn more about this function here.


Best regards,
Andrew
Back to Top View Andrew's Profile Search for other posts by Andrew
 
chapulin
Newbie
Newbie


Joined: 22 August 2006
Online Status: Offline
Posts: 11
Posted: 25 August 2006 at 10:05am | IP Logged Quote chapulin

Thank's i see, I'm made de modifications now the email arrive fine in spam folder but fine

this is the sendmail function of php:

Code:
mail($sendTo, $subject, $message, $headers);


the email specificated in the from if it is possible to be changed, but i not understant how mailbee compose the $headers no problem, i'm try modificate, thank's!
Back to Top View chapulin's Profile Search for other posts by chapulin
 
Andrew
AfterLogic Support
AfterLogic Support


Joined: 28 April 2006
Location: United States
Online Status: Offline
Posts: 1189
Posted: 25 August 2006 at 10:43am | IP Logged Quote Andrew

You can assign values of headers through smtp properties, like $smtp->from. Then you should call $smtp->FormHeaders() method and specify $smtp->headers as the last parameter for mail function.

Best regards,
Andrew
Back to Top View Andrew's Profile Search for other posts by Andrew
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide