Results 1 to 4 of 4

Thread: Webmail client

  1. #1
    Join Date
    Sep 2010
    Location
    Hi Stalker.
    Posts
    148
    Thanks
    16
    Thanked 3 Times in 3 Posts

    Default Webmail client

    I have successfully made a webmail (like Gmail) except I have one issue. I can send emails out, but can't recieve them like, in an inbox inside of that page. How could I make that work if that user doesn't have another webmail?
    Also, how could I censor out profane language with php?
    Try it out here. You'll recieve the email in like 20 mins :P
    http://kapleenmusic.webfreehosting.n...lder/email.htm

    Sendmail.php:
    PHP Code:
    <?php
          $to 
    $_REQUEST['email'];
          
    $email $_REQUEST['eml'] ;
          
    $name $_REQUEST['id'] ;
          
    $subject "Message from: $id";
          
    $message $_REQUEST['message'] ;
          
    $headers "noreply@YOURWEBSITE.com";
          
    $body "From: $name \n\n Email: $email \n\n Wesbite: $site \n\n Message: $message";
          
    $sent mail($to$subject$body$headers) ;
          if(
    $sent)
          {echo 
    "<script language='JavaScript'>window.location='Success.htm'</script>";}
          else
          {echo 
    "<script language='JavaScript'>window.location='Error.htm'</script>";}
          
    ?>

  2. #2
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    This isn't a mail client it's a script that sends mail from your server. I assume your server is using smtp to send the email.

    http://en.wikipedia.org/wiki/Simple_...mail_retrieval

    There are ways to get email but it is more technical. This has been talked about here (posts after 7)

    http://www.dynamicdrive.com/forums/s...ad.php?t=58065

    and the php functions are here:

    http://php.net/manual/en/book.imap.php

    You also might find it better to use the PHP header location than the javascript window.location.

    http://php.net/manual/en/function.header.php
    Corrections to my coding/thoughts welcome.

  3. #3
    Join Date
    Sep 2010
    Location
    Hi Stalker.
    Posts
    148
    Thanks
    16
    Thanked 3 Times in 3 Posts

    Default

    Ok that was helpful but I am still unsure of how to recieve email or what to do to make that possible.
    But thanks for the links they are helpful!

  4. #4
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    If you are receiving the email on your own server and you already have that part configured. You can use this to set it up

    http://www.php.net/manual/en/function.imap-open.php

    Here's an example using gmails server(s).

    http://davidwalsh.name/gmail-php-imap
    Corrections to my coding/thoughts welcome.

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
  •