|
Posted by Dee on 05/14/05 08:31
Dee wrote:
> NC wrote:
>
>> Dee wrote:
>>
>>> I'm trying to get this script to work
>>>
>>> http://tinyurl.com/ay8nu
>>>
>>> I can install it - the thing is once it's run you can register but it
>>
>>
>>
>>> tries to email you your password
>>>
>>> It uses PHP Mailer BUT I can't see in the script where it tells PHP
>>> Mailer to insert your SMTP Password
>>
>>
>>
>> First, look for a call to the PHPmailer constructor. It will
>> look something like this:
>>
>> $mail = new PHPMailer();
>>
>> The "$mail" part can be something else, but the "new PHPMailer()"
>> will have to be there no matter what. Simply put, this code
>> causes creation of a PHPmailer object.
>>
>> Now, find the call to the Send() method later in the code.
>> In the example above, it will look like this:
>>
>> $mail->Send()
>>
>> This is where PHPmailer attempts to send an e-mail message out.
>>
>> Now all you need to do is to add these calls (is they are not
>> there already) anywhere in-between the two pieces of code
>> described above:
>>
>> $mail->IsSMTP();
>> $mail->Host = "smtp.example.com"; // your SMTP server
>> $mail->SMTPAuth = true;
>> $mail->Username = "me"; // your SMTP login name
>> $mail->Password = "mypassword"; // your SMTP password
>>
>> Obviously, "$mail" may have to be replaced with the name defined
>> in the constructor call.
>> Cheers, NC
just found this code in another PHP file .. can I add what you suggested
here?
/SETUP DATE
-----------------------------------------------------------------------
require_once($c_node['dir']['class_path'] . 'Date.class.php');
$date = new Date();
// setup email
require_once($c_node['dir']['class_path'] . '/Batch.class.php');
require_once($c_node['dir']['class_path'] . '/Mail/class.phpmailer.php');
// set up the mailer
$mail = new PHPMailer();
$mail->Host = $c_node['mail']['host'];
$mail->Mailer = $c_node['mail']['mailer'];
$mail->From = $c_node['mail']['default_address'];
$mail->FromName = $c_node['mail']['from_name'];
$mail->WordWrap = $c_node['mail']['wordwrap'];
$mail->language = "en";
$mail->Priority = 3;
$mail->Encoding = "8bit";
$mail->CharSet = "iso-8859-1";
$mail->SMTPKeepAlive = true;
$mail->IsHTML(true);
// set up the Batch-email class
$batch = new Batch($db, $c_node['newsletter']['nr_per_batch']);
Navigation:
[Reply to this message]
|