Jump to content

smtp configure locally


Recommended Posts

Ok, so I set up my local testing server (WAMP), and now I'm trying to get an email server up and running.

 

After trying many different free smtp servers, I finally found a trial version that finally returned true for the mail function. Problem being the test email account never got the email.

 

I don't know what php.ini settings I should have for sending the email. I don't know anything about networking, I really need someones help (if willing).

 

By the way I'm just running windows xp on a local system and the smtp app is called qk smtp3. If you know a better way to accomplish what I'm trying to do (send an email with php from my local test system) I'm all ears.

 

Thanks.

Link to comment
Share on other sites

Do you really need an smtp server installed locally? This will open numerous security holes on your pc leaving you vulnerable to all sorts of mischief. PHP can be configured to use a remote smtp server (such as the one your isp normally provides you access to) for testing purposes.

 

If you insist on using a local smtp server then usually the default (localhost,25) settings will suffice, though unless you have a domain name and the correct certificates configured for your local machine, any mail sent to a remote mta will likely be sent directly to spam/trash.

Link to comment
Share on other sites

Wow, I'm kind of surprised I got a response on this, I've wrote to other forums with no replies. Thanks. 

 

No, I don't need my own smtp, I really just want to use it for testing purpose. I don't pay the bill here and I don't know the ISP. Though I referred to this site http://cqcounter.com/whois/my_ip_address.php. And it returned the following for Hostname:

 

{IP}.dsl.{location i think?}.sbcglobal.net

 

Is there a way I can find/use the remote smtp server based on the Hostname or any other information on this page? What values should I use for the SMTP and send_mail path directives in the ini settings? I hate to hassle you with these newbish questions, really, but I'm lost when it comes to networking. I hope I'm not bothering you too much.  :)

Link to comment
Share on other sites

  • 5 weeks later...

Personally I use a SMTP server 1st SMTP Server as it is a lightweight and efficient client. Althgouh I couldn't recommend it for commerical/business use, it will do you fine for testing purposes.

 

http://www.download.com/1st-SMTP-Server/3000-2367_4-10533495.html

 

When you set up your SMTP server you configure a port for it to operate on (if you didn't do this it will probably be port 25, the default smtp server).

 

ini_set("smtp_port", 25);

ini_set("sendmail_from", "fromaddress@hotmail.com");

mail($to, $subject, $message, $headers);

 

This is the bare essential code to send an email address. Depending on how your SMTP server is configured, the email you're sending from will probably have to be a domain on your server.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.