Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Sending Mail Authentication......
Old 11-23-2010, 04:24 AM Sending Mail Authentication......
Isabella_Smith's Avatar
Ultra Talker

Posts: 285
Trades: 0
I want to send an email via php but it requires authentication, Can anyone help me out as how can I Authenticate it??

Thanks for your kind consideration.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE



Please login or register to view this content. Registration is FREE
buy all indian salwar Kameez, Sarees and clothes
Isabella_Smith is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-23-2010, 10:47 AM Re: Sending Mail Authentication......
Veter's Avatar
Super Talker

Posts: 147
Trades: 0
You need to learn how to ask questions

If you mean you want to send mail with php through SMTP server that requires authentication then you can use phpmailer script for it, or something similar.

If you mean you want to send mail with php mail function but it should be sent from the page that requires authorization, then you can use apache htaccess authorization or code own authorization php script for the page. There are a lot of examples of authorization scripts on this forums or in google.
__________________
-=
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
=-
Veter is offline
Reply With Quote
View Public Profile Visit Veter's homepage!
 
Old 11-24-2010, 12:24 AM Re: Sending Mail Authentication......
Isabella_Smith's Avatar
Ultra Talker

Posts: 285
Trades: 0
Thanks you are right........I must...

Well I want to send mail with php through SMTP server; coz the servers I am using requires authentication for sending any mail, your help would be appreciated.

As I am already trying

PHP Code:
include("Mail.php");

     
$host "webmail.mydomain.com";
     
$username "info@mydomain.com";
     
$password "*******";
$headers = array ('From' => $from,
       
'To' => $to,
       
'Subject' => $subject);
     
$smtp Mail::factory('smtp',
       array (
'host' => $host,
         
'auth' => true,
         
'username' => $username,
         
'password' => $password));
     
     
$mail $smtp->send($to$headers$body);
     
$headers.="Content-type: text/html""charset=iso-8859-1\r\n";
     
     if (
PEAR::isError($mail)) {
       echo(
"<p>" $mail->getMessage() . "</p>");
      } else {
       
header('Location: ../getaquote.php?email=yes&name='.$_POST['name'].'');
       
//echo("<p>Message successfully sent!</p>");
      

In this function I've included ("Mail.php"), but it still required PEAR.php where I can find that.

Or another way would be the best.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE



Please login or register to view this content. Registration is FREE
buy all indian salwar Kameez, Sarees and clothes

Last edited by Isabella_Smith; 11-24-2010 at 12:32 AM..
Isabella_Smith is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Sending Mail Authentication......
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11810 seconds with 12 queries