Jump to content
Larry Ullman's Book Forums

Recommended Posts

I'm curently going through Chapter 8 and learning about the mail() function. As i expected the script produces a warning message when I try to send mail locally to gmail, hotmail or any mail server.

 

As Larry mentions in the book this isn't a problem as you'll never host the website locally, I'm just interested to hear if anyone managed to get this to work? Spent a bit of time fiddlng last night, not going to waste too much time on it though, far too much learning to be done!!

Link to post
Share on other sites

@Jonathon - Thanks a bunch, that hopefully will be useful and I'll be able to send mail locally. Is this the method you used to send email locally in a Wndows environment?

 

After setting this up would I have to send mail to my ISP email address e.g. to my plusnet email address or would it work fr gmail/hotmail etc?

 

Also did you have to specify the headers when coding the mail function as suggested later on in the tutorial?

Link to post
Share on other sites

Yep, I don't really know the ins and outs of it. You need to find out the address for your smtp server for your ISP. It's not your email address, but you can set the mail header as if it came from your email address. I personally didn't have to do anything else but the first step:

 

SMTP = smtp.isp.co.uk (or whatever yours is)

smtp_port = 25

 

I also changed the setting in my .ini file to set the mail sending address.

 

sendmail_from = your email address goes here.

  • Upvote 1
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...