need an smtp server

Discussion in 'Programming' started by Chenks, Nov 12, 2012.

Share This Page

  1. Chenks

    Chenks Registered Trader

    Joined:
    Jan 5, 2002
    Messages:
    3,741
    Likes Received:
    0
    the web host i'm using has mail() function disabled (due to excessive spamming), so i need an smtp that i can use for a contact form on a website.

    any suggestions? needs to be a free solution.

    it needs to allow a user to enter their details in the form, and it sends an email to me with their address as the sender.

    i have all the php code in place, just need an smtp server to use.
     
  2. brumster

    brumster Midland Muppet

    Joined:
    Jun 2, 2004
    Messages:
    3,635
    Likes Received:
    0
    If you can use authentication, why not set up a gmail account and use their free SMTP service?
     
  3. Chenks

    Chenks Registered Trader

    Joined:
    Jan 5, 2002
    Messages:
    3,741
    Likes Received:
    0
    does that let you receive the email from the other persons email address though? i didn't think it did.
     
  4. brumster

    brumster Midland Muppet

    Joined:
    Jun 2, 2004
    Messages:
    3,635
    Likes Received:
    0
    SMTP is for sending mail, not receiving it - so your code will need to log in with authentication (your gmail id) in order to submit the email to the server; the source address of the email will appear to be whatever you set in your code (from). There are some free PHP libraries that support authenticated and encrypted SMTP.
     
  5. Chenks

    Chenks Registered Trader

    Joined:
    Jan 5, 2002
    Messages:
    3,741
    Likes Received:
    0
    i know... i'm sending an email to myself essentially, so in reality i'm receiving it.

    user fills out a contact form on website, enters THEIR email address in the "from" field, fills out the rest of the form, click "send" and the email gets delivered to me and the reply address is their email address from the form.

    i already have a working script, i just needed an SMTP server to use.
    i don't really have a desire to sign up for a gmail account though, rather stay away from there.
     
  6. brumster

    brumster Midland Muppet

    Joined:
    Jun 2, 2004
    Messages:
    3,635
    Likes Received:
    0
    That should all work fine then. The "sender", as far as the SMTP server is concerned, is your PHP script not the individual who filled out the form. You authenticate as yourself, but you can specify the sender as anyone you like. Even if that doesn't work, set the sender as yourself but put the details of the form in the body of the email - you can then still email back the person who filled in the form.

    I think you'll have trouble finding free SMTP servers that don't use authentication - at best they might restrict to a particular IP address range or subnet, as most ISPs do. Surely your hosting provider must have some SMTP server within their subnet that you can use? If you're hosted by wibbleboing.com, for example, have you tried mail.wibbleboing.com, relay.wibbleboing.com and smtp.wibbleboing.com to see if there's a port open? Try it from your server, where your PHP code is running, not from your home machine as it might block that source address.
     
  7. Chenks

    Chenks Registered Trader

    Joined:
    Jan 5, 2002
    Messages:
    3,741
    Likes Received:
    0
    i ended up using mailjet.com.
    it's free providing you don't send more than 6000 emails per month.
    plus it has some interesting tracking and reporting functions too.
     
  8. brumster

    brumster Midland Muppet

    Joined:
    Jun 2, 2004
    Messages:
    3,635
    Likes Received:
    0
    Excellent. Looks good actually - might have to keep that one in my back pocket for future use ;)
     
  9. Chenks

    Chenks Registered Trader

    Joined:
    Jan 5, 2002
    Messages:
    3,741
    Likes Received:
    0
    by default it only lets you have a pre-approved "sender" address, but once you authenticate the domain you drop the support team an email and they activate the ability for the form filler to use their own email address as the "sender".