HighDots Forums  

mail () function/localhost

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss mail () function/localhost in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
chris.cavage
 
Posts: n/a

Default mail () function/localhost - 12-31-2008 , 02:12 PM






I would like to use the mail () function on my localhost server.

When I do, I get an error related to the smtp.

In php.ini ...


[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25

Is it true that I have to upload the server to godaddy.com, for instance, in
order for the mail() function to work properly? Is there a way around it?

Thanks!!!


Reply With Quote
  #2  
Old   
Murray *ACE*
 
Posts: n/a

Default Re: mail () function/localhost - 12-31-2008 , 03:02 PM






Upload the server to GoDaddy? What server? Are you on a 32-bit Windows
platform?

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"chris.cavage" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
I would like to use the mail () function on my localhost server.

When I do, I get an error related to the smtp.

In php.ini ...


[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25

Is it true that I have to upload the server to godaddy.com, for instance,
in
order for the mail() function to work properly? Is there a way around it?

Thanks!!!



Reply With Quote
  #3  
Old   
chris.cavage
 
Posts: n/a

Default Re: mail () function/localhost - 12-31-2008 , 04:10 PM



I mean upload my db to host. To go from localhost to online.
Yes, I am a win 32 bit.


Reply With Quote
  #4  
Old   
Murray *ACE*
 
Posts: n/a

Default Re: mail () function/localhost - 12-31-2008 , 04:21 PM



Sorry - I am lost now. I don't see anything in this thread about a
database.

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"chris.cavage" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
I mean upload my db to host. To go from localhost to online.
Yes, I am a win 32 bit.



Reply With Quote
  #5  
Old   
chris.cavage
 
Posts: n/a

Default Re: mail () function/localhost - 01-01-2009 , 02:50 PM



Ok, maybe I am wording it wrong.

To get back to the basic:

When I use the php mail () fuction in my code I get an error referring to
permissions on my localhost machine. I am to check my smtp it says.

Thanks.


Reply With Quote
  #6  
Old   
Murray *ACE*
 
Posts: n/a

Default Re: mail () function/localhost - 01-01-2009 , 03:45 PM



Do you *need* to send mail from your local system, or is this just for
testing purposes?

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"chris.cavage" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Ok, maybe I am wording it wrong.

To get back to the basic:

When I use the php mail () fuction in my code I get an error referring to
permissions on my localhost machine. I am to check my smtp it says.

Thanks.



Reply With Quote
  #7  
Old   
chris.cavage
 
Posts: n/a

Default Re: mail () function/localhost - 01-01-2009 , 08:53 PM



I am creating a "forgot password' page that will query mysql and send the forgotten password via email to the user.

I wanted to test it out. See how it works.

Reply With Quote
  #8  
Old   
chris.cavage
 
Posts: n/a

Default Re: mail () function/localhost - 01-02-2009 , 12:30 AM



I have edited php.ini

SMTP = smtp.comcast.net
smtp_port = 25

; For Win32 only.
;sendmail_from = me (AT) gmail (DOT) com

I have also restarted wamp.

My test mail code:

<?php
$message = "This is a test";
$headers = "From: me";
mail("me (AT) gmail (DOT) com", "Testing", $message, $headers);
?>

I get the following error:

Warning: mail() [function.mail]: SMTP server response: 550 5.1.0
Authentication required on line 43 ... which is the mail() line.

I have disabled all firewalls also... any ideas why mail () won't work?



Reply With Quote
  #9  
Old   
Murray *ACE*
 
Posts: n/a

Default Re: mail () function/localhost - 01-02-2009 , 07:11 AM



Upload it to your server and test it there.

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"chris.cavage" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
I am creating a "forgot password' page that will query mysql and send the
forgotten password via email to the user.

I wanted to test it out. See how it works.


Reply With Quote
  #10  
Old   
Gary White
 
Posts: n/a

Default Re: mail () function/localhost - 01-02-2009 , 08:51 AM



On Fri, 2 Jan 2009 05:30:45 +0000 (UTC), "chris.cavage"
<webforumsuser (AT) macromedia (DOT) com> wrote:

Quote:
I get the following error:

Warning: mail() [function.mail]: SMTP server response: 550 5.1.0
Authentication required on line 43 ... which is the mail() line.
That means that your mail server requires you to log in before sending
mail. The PHP mail() function is not designed to do that. It works
directly with the server's sendmail program. If you want to test locally,
you'd need to install a mail server on your local machine. That's probably
more trouble than it's worth when you can simply upload and test on your
real server, which will be a more accurate test anyway.

Gary


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.