Wrox Programmer Forums
|
Pro PHP Advanced PHP coding discussions. Beginning-level questions will be redirected to the Beginning PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 10th, 2006, 08:08 PM
Friend of Wrox
 
Join Date: Dec 2004
Posts: 154
Thanks: 0
Thanked 0 Times in 0 Posts
Default mail ( )

Hi,

I'm new at this mail( ) system.. I never had to configure the server before and although it "only" took me 1 day to get a mailserver up (mainly cause no one told me that port 110 was needed...) I have a small issue:

Warning: mail() [function.mail]: SMTP server response: 503 This mail server requires authentication when attempting to send to a non-local e-mail address. Please check your mail client settings or contact your administrator to verify that the domain or address is defined for this server.

Ok.. so if I send an email in "local" it work fine.. but if I try to send it out it ask for a username and password. Actually I wanted a username and passwor din local too but I guess I missed that option somewhere.

However the problem is.. how / where do I put the username and passord exactly???

my code:
<?php
$headers = 'From: [email protected]' . "\r\n";
$headers.= "MIME-version: 1.0\n";
$headers.= "Content-type: text/html; charset= iso-8859-1\n";
$message = "Dear Mr X, You have been selected to come on a free trip to America for your birthday\n";
$sentto="[email protected]";
mail($sentto,'Come to America', $message, $headers);
?>

Yeah I know i'm not really George Bush .. you got me ;)

Seriously though .. anyone got a clue how to specify a username and password??

Thanks.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Send mail and attachments with PHP mail function Lofa Beginning PHP 1 June 2nd, 2008 03:24 PM
problems sending mail with java mail gandacuboy J2EE 2 December 20th, 2006 03:05 PM
Sending e-mail to different mail box! Calibus Classic ASP Databases 4 September 3rd, 2004 05:48 PM
Sending both text mail and HTML mail - CDONTS madhukp Classic ASP Basics 1 October 8th, 2003 01:05 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.