icon Learn how to get the most out of Surmunity - read our forum tips here! | Welcome! Please register to access all of our features.

» Surpass Web Hosting Forums » Discussions » PHP, MySQL » SMTP configurations for a php mail script?

PHP, MySQL General PHP questions. Or go to our PHPsuexec Forum >>

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread
Old April 27th, 2008, 3:46 AM   #1 (permalink)
Registered User
Seasoned Poster
 
Joined in Mar 2008
Lives in California
Hosted on SH126
35 posts
Gave thanks: 9
Thanked 0 times
SMTP configurations for a php mail script?

On our website (on a shared hosting plan), there's this "Recover your password" option we would like to enable for users.

This is the php script it uses: .../cerescp/mail.php and here are the configs:
PHP Code:
//Mail
$CONFIG['smtp_server']       =    'smtp.yoursmtpserver.com';            // the smtp server, the cp will use to send mails
$CONFIG['smtp_port']         =    '25';            // the smtp server port
$CONFIG['smtp_mail']         =    'user@youremail.com';            // the email of the admin
$CONFIG['smtp_username']     =    '';            // the username of the smtp server
$CONFIG['smtp_password']     =    '';            // the password of the smtp server 
How would we configure these settings to work with SH126's smtp server?
Also, does Surpass allow connecting to other smtp servers for sending mail?
(like can we send the mail through Gmail?)

Thanks for the help
brianluau is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old June 27th, 2008, 7:59 PM   #2 (permalink)
Registered User
Seasoned Poster
 
gmax21's Avatar
 
Joined in Jun 2008
Lives in UK
68 posts
Gave thanks: 5
Thanked 8 times
I'm just getting to grips with how things run here so I may not be entirely accurate. I'll also assume your domain is set up here also.

Looking at (Which tells about outlook): https://desk.surpasshosting.com/inde...d=150&nav=0,13

ii. Outgoing mail server (SMTP) [ mail.yourdomain.com]

I don't know if it would vary on shared hosting package though.

often a host will then use the same username and password for the SMTP as the POP or IMAP. I presume you already have E-mail set up in some form?

If you have cPanel you would probably be able to get the info in there also. I've never really used cPanel so I'm not sure where to find it, just look for something that says e-mail account.
gmax21 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
This user thanks gmax21 for this great post!
brianluau (June 28th, 2008)
Old June 27th, 2008, 10:46 PM   #3 (permalink)
the one who was
Super #1
 
patrickb's Avatar
 
Joined in Jul 2003
Lives in Memphis
1,967 posts
Gave thanks: 0
Thanked 3 times
PHP Code:
//Mail
$CONFIG['smtp_server']       =    'mail.yourdomain.com';            // replace yourdomain with your real domain
$CONFIG['smtp_port']         =    '25';                             // this is good
$CONFIG['smtp_mail']         =    'user@youremail.com';             // this will most likely be the email address the script sends an email alert to anytime someone requests a password change.  It is helpful to keep an eye out for abuse or suspicious activity.  You may want to setup a special email address in your Cpanel just to receive these emails and enter that email address here
$CONFIG['smtp_username']     =    'username@yourdomain.com';        // this is the username to login to the mail server.  It will be the same thing you use to login and check your email currently.  You may also consider setting up a special email account in Cpanel just to have this script send emails from.
$CONFIG['smtp_password']     =    '<the password to that account>'// the password of email address directly above. 
__________________
Patrick

Warnings: The program(s) might crash unexpectedly or behave otherwise strangely. (But of course, so do many commercial programs on Windows.) --www.gimp.org
patrickb is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
This user thanks patrickb for this great post!
brianluau (June 28th, 2008)
Old June 28th, 2008, 12:47 AM   #4 (permalink)
Registered User
Seasoned Poster
 
Joined in Mar 2008
Lives in California
Hosted on SH126
35 posts
Gave thanks: 9
Thanked 0 times
Thanks both of you, for the help

We got it working and the config looks something like this:

PHP Code:
//Mail
$CONFIG['smtp_server']       =    'sh###.surpasshosting.com';            // the smtp server, the cp will use to send mails
$CONFIG['smtp_port']         =    '25';            // the smtp server port
$CONFIG['smtp_mail']         =    'user@domain.com';            // the email of the admin
$CONFIG['smtp_username']     =    '<cPanel login>';            // the username of the smtp server
$CONFIG['smtp_password']     =    '<cPanel pass>';            // the password of the smtp server 
brianluau is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old June 28th, 2008, 12:55 AM   #5 (permalink)
Registered User
Seasoned Poster
 
gmax21's Avatar
 
Joined in Jun 2008
Lives in UK
68 posts
Gave thanks: 5
Thanked 8 times
Cool, not a problem I'm just pleased I made sense for a change. :-)
gmax21 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On