SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot
    Join Date
    Jul 2011
    Posts
    199
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Possible to use a gmail address using the mail() function?

    Hello,

    I have a gmail email address. I'd like to wrap it in my adminCP (as in: I would like to send emails from my AdminCp using the @gmail.com adress).

    Is it feasible, or should I just drop the idea?

    Best.

    rh

  2. #2
    SitePoint Zealot
    Join Date
    Oct 2008
    Posts
    167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can specify a from address in the additional headers parameter of the mail() function.

    See:

    http://www.php.net/manual/en/function.mail.php

    Basically you would use something like:

    PHP Code:
    mail($to$subject$message"From: <your@gmail.com>\r\n"); 
    (the "\r\n" has to do with carriage returns and new lines in the message headers)
    CanisHosting - Web Hosting plans starting at $3.95 per month

  3. #3
    Keeper of the SFL StarLion's Avatar
    Join Date
    Feb 2006
    Location
    Atlanta, GA, USA
    Posts
    3,747
    Mentioned
    64 Post(s)
    Tagged
    0 Thread(s)
    Gmail is notorious for sending said mails to the Junk folder, so be aware of that.
    Never grow up. The instant you do, you lose all ability to imagine great things, for fear of reality crashing in.

  4. #4
    SitePoint Zealot
    Join Date
    Jul 2011
    Posts
    199
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the reply

    StarLion: I'm not exactly sure what you mean...


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •