Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

php question regarding email

  • 07-02-2008 06:02PM
    #1
    Closed Accounts Posts: 51 ✭✭


    im trying to get an email to be sent from my email address to all users that register with my site, however i keep getting an smtp.port and host error each time i go to run the page.
    im not sure wat this is?


Comments

  • Registered Users, Registered Users 2 Posts: 31 markkilpatrick


    have you got your smtp server set in your php.ini file?


  • Closed Accounts Posts: 51 ✭✭poissys


    have you got your smtp server set in your php.ini file?

    i haven't got that done no, how do i go about doing it, i know nothing about it, excuse my ignorance


  • Closed Accounts Posts: 1,200 ✭✭✭louie


    did you look into the php mail http://ie2.php.net/mail
    [php]
    mail($to, $subject, $msg, $headers);
    [/php]
    function.
    Grab the email from DB, and using while....loop send the email one by one.


  • Moderators, Politics Moderators, Paid Member Posts: 44,269 Mod ✭✭✭✭Seth Brundle


    louie wrote: »
    did you look into the php mail http://ie2.php.net/mail
    [php]
    mail($to, $subject, $msg, $headers);
    [/php]function.
    Grab the email from DB, and using while....loop send the email one by one.
    Obviously remembering to tackle email injection before of course!

    Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/ .



  • Registered Users, Registered Users 2 Posts: 31 markkilpatrick


    poissys wrote: »
    i haven't got that done no, how do i go about doing it, i know nothing about it, excuse my ignorance

    Do you have hosting somewhere or are you running your webserver on your pc?

    if yes:

    In your php.ini file you will find:
    SMTP = localhost
    smtp_port = 25
    This will need to be changed to your isp's smtp.

    Otherwise if you have hosting with somebody you shouldnt need to do this.

    If you post an example of your code it will be eaiser to help.


  • Advertisement
Advertisement