Friday, December 27, 2024
  • SABUNG AYAM ONLINE SBOBET LIVE CASINO ONLINE SLOT GACOR SV388 AGEN BOLA ONLINE LIVE CASINO ONLINE SCATTER HITAM AGEN SABUNG AYAM ONLINE SV388 AGEN BOLA ONLINE LIVE CASINO ONLINE SCATTER HITAM master303 master303 master303 master303 TOGEL HONGKONG Mahjong Wins 3 Sabung Ayam Online Live Casino Online Situs Mahjong Ways Sabung Ayam Bali Live Baccarat Casino Online JUARA303 JUARA303 INDOPROMAX INDOPROMAX casino online poker online slot online slot777 indoplay77 indoplay77 indoplay77 indoplay77 SCATTER HITAM LIVE CASINO ONLINE TOGEL AGEN BOLA ONLINE SV388 SABUNG AYAM ONLINE AGEN BOLA ONLINE TOTO 4D LIVE CASINO ONLINE SCATTER HITAM AGEN TOGEL SCATTER HITAM LIVE CASINO ONLINE AGEN BOLA ONLINE SABUNG AYAM ONLINE/a> wala meron live casino online gates of olympus joker123 pg soft mahjong wins casino online bandar bola MAHJONG WINS 3 SBOBET AGEN CASINO ONLINE SABUNG AYAM ONLINE GATES OF OLYMPUS XMAS 1000 SBOBET SCATTER HITAM AGEN CASINO ONLINE JUARA303 JUARA303 INDOPROMAX INDOPROMAX indomax88 bandar judi bola link scatter hitam sv388 shio togel mahjong slot sv388 INDOBIT88 SBOBET SBOBET INDOBIT88 sv388 scatter hitam slot dana Slot Online indobit88 baccarat poker mahjong wins 3 gates of olympus indoplay77 indoplay77 indoplay77 indoplay77 mahjong ways 2 gates of olympus mahjong ways mahjong wins kasino online pola maxwin gatotkaca pola zeus slot maxwin pola maxwin starlight princess pola black scatter mahjong wins 3 slot gacor sweet bonanza Pola Starlight Princess scatter hitam mahjong ways 2 INDOMASTER88 INDOMASTER88 INDOMASTER88 INDOMASTER88 INDOMASTER88 INDOMASTER88 INDOMASTER88 INDOMASTER88 mahjong wins 3 mahjong ways mahjong ways mahjong ways 2 mahjong ways 2 trik curang hacker modal 100k cair 4juta cari uang samping main game slot jam ghacor akun vip 100 orang pertama menyambut nataru pola pecah jackpot menang 1 Pajero dragon hatch menggunakan cheat langsung layar full gambar panduan maxwin sensasional gates of olympus keunikan keuntungan mutar slot mahjong jam malam trik dan pola tersembunyi 5 daftar game top rank pola mahjong wins 3 mahjong ways 2 modal sedikit kasino online kasino online kasino online rtp Ketiban Durian Runtuh 250 Juta di Gates of Olympus banyak netizen cari kemenangan besar hari natal di mahjong ways christimas eve dan gates of olympus membagikan hadiah kado natal uang tunai untuk warga kakek zeus beri ucapan selamat natal merry christmas merayakan bermain gates of olympus menegangkan main mahjong wins 3 pakai qris langsung beli scatter begini caranya Pola Gacor Starlight Princess Black Scatter Mahjong Wins 3 Slot Online Gacor Sweet Bonanza Pola Gacor Gates Of GatotKaca Slot Gacor Sweet Bonanza slot777 slot777 slot777 slot777 slot777 slot777 slot777 slot777 slot777 slot777 INDOMASTER88 INDOMASTER88 INDOMASTER88 INDOMASTER88 INDOMASTER88 pemburu black scatter mahjong wins mahjong ways solusi cari uang samping link settingan ramalan 3 zodiak jadi jutawan main mesin slot cara dapat scatter dalam 30 putaran bermain game slot olympus di jam gacor jelang akhir tahun putaran turbo mahjong kode rahasia seo mr r game olympus trik bar bar starlight princess maxwin daging pg soft rtp tinggi pola kombinasi strategi pola waktu terbaik indobola77 sabung ayam online casino online agen bola sabung ayam online
  • HomeBusinessHow to catch emails sent with PHP on your local server

    How to catch emails sent with PHP on your local server

    Date:

    Related stories

    Is It Safe to Pay Someone to Do My Online Class?

    As online education continues to grow, so does the...

    Thailand Entertainment Exploration: Theme Parks and Thrills

    Thailand, renowned for its cultural landmarks and natural beauty,...

    Your Ultimate Online Game Experience Begins with Dewazeus33 Situs

    In the world of online gaming, finding the right...

    Unlocking Global Markets: Premium Translation Services for UK Businesses

    As businesses increasingly look beyond their borders for growth...

    웨이브툰이 웹툰 접근성을 혁신하는 방법

    웹툰은 디지털 콘텐츠의 중요한 부분으로 자리 잡았으며, 전 세계적으로...
    spot_img

    First, create a folder for your outgoing mail. We will create it in under /var/log/ where all the logs are stored:

    $ sudo mkdir /var/log/mail

    Create file /usr/local/bin/sendmail using your favorite text editor, I normally use Nano editor:

    $ sudo nano /usr/local/bin/sendmail

    Add following PHP script to this new “sendmail” file:

    #!/usr/bin/php
    <?php
    $input = file_get_contents('php://stdin');
    preg_match('|^To: (.*)|', $input, $matches);
    $filename = tempnam('/var/log/mail', $matches[1] . '.');
    file_put_contents($filename, $input);

    This is where the magic happens and emails sent from PHP are stored as textfiles. The email address is extracted from the full email using regular expression, and used as the filename base – the tempnam() function creates a random filename with the email address used as filename prefix. You can alter this part however you want, for example include a timestamp in the filename.

    We need to link our PHP script to PHP’s sendmail functionality. Edit your php.ini file and set the sendmail_path setting as following:

    sendmail_path = /usr/local/bin/sendmail

    If you use Ubuntu/Kubuntu 12.4, your php.ini file is normally located at /etc/php5/apache2/php.ini. You can find your php.ini location also using the phpinfo() function, where you look for “Loaded Configuration File” value in the function’s output.

    Now we need to set permissions for new files/folders:

    $ sudo chmod 755 /usr/local/bin/sendmail
    $ sudo chmod 777 /var/log/mail

    Restart apache:

    $ sudo /etc/init.d/apache2 restart

    And that’s it! You can now try to send an email using PHP’s mail() function and check the /var/log/mail folder.

    Latest stories

    spot_img