View previous topic :: View next topic |
Author |
Message |
hc2995 -
Joined: 07 Aug 2006 Posts: 644 Location: Maryland, USA
|
Posted: Fri Mar 30, 2007 2:58 am Post subject: Sending an e-mail from a non localhost mail server? |
|
|
My friend is working on a site using an e-mail host (i have told him about abyss but he dosent want to have to worry about running a server) He is using a host who gives him access to there SMTP mail server and he wants me to make him a contact script, which i can do, but i do not know how to make php send the mail out via a non local host.... I am using the mail(); function. Any help thanked :D _________________ Where have i been? School got heck-tick, had to move half way around the state, then back... and then i had to change jobs, so iv been away for a while :P |
|
Back to top |
|
 |
pkSML -
Joined: 29 May 2006 Posts: 955 Location: Michigan, USA
|
Posted: Fri Mar 30, 2007 12:08 pm Post subject: |
|
|
I've stumbled across a PHP script that will send mail on behalf of a gmail account. If your friend has a Gmail account, the contact form can send mail to his gmail account, and he can pick it up via POP3 in Outlook Express.
Interested? _________________ Stephen
Need a LitlURL?
http://CodeBin.yi.org |
|
Back to top |
|
 |
hc2995 -
Joined: 07 Aug 2006 Posts: 644 Location: Maryland, USA
|
Posted: Fri Mar 30, 2007 12:40 pm Post subject: |
|
|
pkSML wrote: | I've stumbled across a PHP script that will send mail on behalf of a gmail account. If your friend has a Gmail account, the contact form can send mail to his gmail account, and he can pick it up via POP3 in Outlook Express.
Interested? |
I am _________________ Where have i been? School got heck-tick, had to move half way around the state, then back... and then i had to change jobs, so iv been away for a while :P |
|
Back to top |
|
 |
pkSML -
Joined: 29 May 2006 Posts: 955 Location: Michigan, USA
|
|
Back to top |
|
 |
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Fri Aug 31, 2007 6:43 am Post subject: |
|
|
That script contains a lot of erors that I've spotted. I will fix them and give you the fixed version to put on your site. Some of the problems, and the most annoying ones are E_NOTICE messages. Also, if you don't have Open SSL extension enabled, the script continues to run and outputs an error. I've done very stupid things like this too as a developer, and my new PHP and MySQL book teaches me not to.
I will work on the code right now and upload it to my server in a ZIP archive for you to download. You can debug by setting "error_reporting = E_ALL" in your php.ini file.
Edit: The script is fixed and E_NOTICES are no longer shown. I also added some extra code that prints an error message if it cannot find the OpenSSL PHP Extension (php_openssl.dll). Enjoy!
Download it here:
http://www.trustabyss.com/scripts/downloads/gmail.zip (Inlcudes the whole Kit and Caboodle)
Kind regards, Josh |
|
Back to top |
|
 |
pkSML -
Joined: 29 May 2006 Posts: 955 Location: Michigan, USA
|
|
Back to top |
|
 |
|