Friday, November 22, 2024
  • https://pay.morshedworx.com/wp-content/jss/ https://pay.morshedworx.com/wp-content/plugins/secure/ https://pay.morshedworx.com/wp-content/plugins/woocom/ https://plppgi.web.id/folder/ https://plppgi.web.id/images/ https://anandarishi.com/images/gallery/picture/ https://anandarishi.com/fonts/alpha/ https://anandarishi.com/includes/uploads/ https://gmkibogor.live/wp-includes/images/gallery/ https://alzette.edu.eu/university/ https://alzette.edu.eu/admission/ https://rsu.tilganga.org/js/unit/ https://smpn1patokbeusi.sch.id/public/version/ https://egitimisizmir4.org/assets/vendor/ https://99industries.id/wp-includes/css/ https://www.thedrinksbasket.com/ https://mppmal.my/wp-includes/certificates/license/ https://onlinesergi.usak.edu.tr/storage/calismalar/May2021/ https://www.gymratchallenge.com/auth/ https://pmb.stisipbantenraya.ac.id/wp-includes/public/ https://integrityglobaltrading.com/wp-content/toko/ https://classiebit.com/storage/athena/ https://aquinoacupuncture.com/wp-includes/blocks/rss/ https://aquinoacupuncture.com/wp-includes/data/ https://pindropads.com/wp-includes/blocks/rss/ https://www.smamta-ska.sch.id/post/public/ https://www.smamta-ska.sch.id/post/file/ https://www.smamta-ska.sch.id/post/data/ https://aulavirtual-kairos.com/core/ https://institute.classiebit.com/theme/ https://salulekbo.desa.id/first/statistik/01/ https://reskriminal.com/wp-includes/public/ https://gpdibangkam.com/auth/ https://gpdibangkam.com/cox/ https://esadarmakhatulistiwa.com/def/ https://esadarmakhatulistiwa.com/dist/ https://kas.gpdibangkam.com/ass/ https://kas.gpdibangkam.com/lib/ https://iaikepri.com/fix/ https://iaikepri.com/aux/ https://mesind3.itn.ac.id/wp-content/languages/ https://mesind3.itn.ac.id/wp-content/uploads/ https://sdnu1gresik.sch.id/ https://jaketgrayscale.com/wp-includes/blocks/rss/ https://jaketgrayscale.com/wp-includes/css/ https://jaketgrayscale.com/wp-includes/data/ https://jaketgrayscale.com/wp-includes/js/ https://cjnc.ppnijateng.org/wp-includes/blocks/ https://cjnc.ppnijateng.org/wp-includes/css/ https://cjnc.ppnijateng.org/wp-includes/data/ https://cjnc.ppnijateng.org/wp-includes/js/ https://krakatauinternationalport.co.id/vendor/flipe/ https://staveblasters.co.nz/lib/tir/ https://staveblasters.co.nz/lib/typo/ https://staveblasters.co.nz/lang/en/xfonts/ https://staveblasters.co.nz/lang/en/xsv/ https://morshedworx.com/wp-content/plugins/bola/ https://morshedworx.com/wp-content/plugins/sgp/ https://morshedworx.com/wp-content/uploads/slot/ https://morshedworx.com/wp-content/uploads/sv/ https://janak.classiebit.com/theme/ https://janak.classiebit.com/disk/ https://janak.classiebit.com/supplies/ https://janak.classiebit.com/scan/ https://greentick.taxsutra.com/casino/ https://greentick.taxsutra.com/ayam/ https://greentick.taxsutra.com/bola/ https://greentick.taxsutra.com/slot/ https://bernasnews.id/schitam/ https://bernasnews.id/version/ https://bernasnews.id/wp-content/berita/ https://bernasnews.id/wp-content/lib/ https://egger2024.eysportal.com/css/data/ https://egger2024.eysportal.com/css/visit/ https://egger2024.eysportal.com/js/guard/ https://egger2024.eysportal.com/js/text/ https://leban.desa.id/assets/chin/ https://leban.desa.id/kabardetail/sv/ https://leban.desa.id/ppid/01/ https://leban.desa.id/kabar/01/ https://leban.desa.id/galeri/images/ https://leban.desa.id/petadesa/batas/ https://leban.desa.id/desa/wisata/01/ https://leban.desa.id/profile/01/ https://leban.desa.id/file/ https://leban.desa.id/kegiatan/pelantikan/ https://dimasmigda.ro/detail/ https://dimasmigda.ro/file/ https://dimasmigda.ro/folder/ https://dimasmigda.ro/images/ slot thailand sv388 judi bola online casino online slot online sv388 agen sbobet casino online slot gacor sabung ayam online casino online agen bola scatter hitam sabung ayam online sbobet sv388 live casino online scatter hitam unobet77 slot bonanza indoplay77 indoplay77 indoplay77 indoplay77 lucky neko live casino online agen bola online casino online slot gacor sv388 sabung ayam online live casino online scatter hitam wap sbobet agen bola sbobet live casino online sv388 slot mahjong ways toto togel 4d toto 4d sabung ayam online live casino online agen bola scatter hitam SBOBET MIX PARLAY LIVE CASINO ONLINE Toto Togel 4D Situs Slot Gacor Sabung Ayam Online Live Casino Online Slot Thailand Situs Bola Online slot gacor Slot Mahjong Ways Slot zeus slot thailand Sv388 Sbobet Live Casino Online Scatter Hitam SLOT GACOR SLOT GACOR LIVE CASINO ONLINE SBOBET SV388 SCATTER HITAM SABUNG AYAM ONLINE SBOBET LIVE CASINO ONLINE Togel Online Casino Online Sabung Ayam Online SBOBETr SITUS TOGEL ONLINE Live Casino Online Slot Deposit Pulsa SV388 SABUNG AYAM ONLINE SBOBET88 CASINO ONLINE SPACEMAN SLOT WS168 MIX PARLAY SBOBET CASINO ONLINE LUCKY NEKO UNOBET77 UNOBET77 UNOBET77 INDOPLAY77 INDOPLAY77 live cacino online agen sabung ayam mix parlay sbobet sv388 live baccarat mahjong ways2 casino online slot88 Live Casino Baccarat Sv388 Casino Online Joker123 scatter hitam sbobet SV388 Live Casino Online SCATTER HITAM SITUS SBOBET ONLINE LINK CASINO MASTER303 LINK SABUNG AYAM LINK GACOR LINK SLOT GACOR SITUS SABUNG AYAM LINK CASINO ONLINE LINK SBOBET ONLINE scatter hitam slot qris slot thailand slot zeus scatter hitam agen sabung ayam online judi bola online Live Casino Online mix parlay sbobet sabung ayam online live casino online agen bola Sabung Ayam Online Slot Online Live Casino Online SBOBET Scatter Hitam Sabung Ayam Online Live casino Sv388 Mix Parlay Slot777 LIVE CASINO ONLINE LIVE CASINO ONLINE SLOT THAILAND LIVE CASINO ONLINE AGEN BOLA SABUNG AYAM ONLINE SLOT777 SV388 SBOBET LIVE CASINO ONLINE SLOT ONLINE LIVE CASINO ONLINE SABUNG AYAM ONLINE SBOBET Agen Bola SBOBET SV388 Sabung Ayam Online LIVE CASINO ONLINE Slot Gacor AGEN BOLA Sabung Ayam Online Casino Online SCATTER HITAM UNOBET77 UNOBET77 UNOBET77 KOI GATE INDOPLAY77 SUGAR RUSH LINK JUDI BOLA ONLINE SITUS CASINO ONLINE SABUNG AYAM ONLINE SLOT GACOR SLOT GACOR ONLINE SITUS SABUNG AYAM situs casino online situs judi bola SV388 JUDI BOLA ONLINE SCATTER HITAM SITUS TOGEL SV388 JUDI BOLA ONLINE CASINO ONLINE SLOT ONLINE agen bola live casino online sabung ayam online toto togel online scatter hitam Slot Gampang Menang Casino Online Sabung Ayam Online Sabung Ayam Online SABUNG AYAM ONLINE CASINO ONLINE Slot Thailand agen bola sbobet live casino online sabung ayam online toto togel online SV388 JUDI BOLA ONLINE LIVE CASINO ONLINE SPACEMAN SV388 JUDI BOLA ONLINE CASINO ONLINE MAHJONG WINS 3 UNOBET77 UNOBET77 UNOBET77 UNOBET77 INDOPLAY77 INDOPLAY77 INDOPLAY77 INDOPLAY77 Sabung Ayam Online Agen Judi Bola Agen Casino Online Starlight Princess Mix Parlay Agen Bola SV388 Sabung Ayam Online Live Casino Online SCATTER HITAM LIVE CASINO ONLINE SBOBET SABUNG AYAM ONLINE SCATTER HITAM SCATTER HITAM SABUNG AYAM ONLINE SBOBET LIVE CASINO ONLINE AGEN BOLA ONLINE LIVE CASINO ONLINE SABUNG AYAM ONLINE SLOT777 MIX PARLAY Live Casino Online Situs Slot Gacor SV388 Situs Judi Bola Live Casino Online SV388 Slot Gacor Maxwin Sbobet Sv388 mix parlay sbobet sv388 slot thailand live draw hk mix parlay sbobet sabung ayam online sabung ayam online live casino online agen bola INDOPLAY77 INDOPLAY77 INDOPLAY77 INDOPLAY77 SLOT THAILAND ZEUS SLOT UNOBET77 UNOBET77 UNOBET77 UNOBET77 sabung ayam online mahjong ways mahjong slot Sbobet Sv388 Casino Gacor sabung ayam online SV388 SBOBET88 LIVE CASINO ONLINE INDOPROMAX SABUNG AYAM ONLINE CMD368 LIVE CASINO ONLINE JUARA303 MIX PARLAY Live Casino Online Situs Slot Gacor SV388 Situs Judi Bola Live Casino Online SV388 Slot Gacor Maxwin SLOT ZEUS AGEN BOLA SBOBET SABUNG AYAM ONLINE LIVE CASINO ONLINE MIX PARLAY SLOT ONLINE LIVE CASINO ONLINE SV388 AGEN BOLA ONLINE SABUNG AYAM ONLINE LIVE CASINO ONLINE SLOT DANA SLOT GACOR SV388 LIVE CASINO ONLINE SBOBET88 SBOBET SV388 Live Casino Online SCATTER HITAM Agen SBOBET Casino SLOT DEMO PRAGMATIC MASTER JUDI BOLA BANDAR TOGEL agen sbobet casino online sv388 agen bola 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

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

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

    뉴토끼에서 추천하는 웹소설 원작 웹툰

    웹소설 원작 웹툰은 점점 더 많은 독자들에게 사랑받고 있는...

    카지노 보너스의 종류와 활용법

    카지노 게임을 즐길 때, 보너스는 플레이어에게 큰 혜택을 제공합니다....

    The Ultimate Guide to Poker Tournaments

    Poker tournaments have become a hallmark of competitive gaming,...

    How to Make Informed Bets on Bet365 Korea

    Betting on Bet365 Korea can be an exciting and...
    spot_img

    aWhen developing websites using PHP on your local server, it’s very useful to see all outgoing emails from your PHP application, if you use the mail() PHP function. This is even more important if you develop on base of a CMS, where you can use various emails templates, field tokens and many other things that you first want to test locally before you push it to your online dev environment. This tutorial explains how to get these emails stored as textfiles in your local folder (every email as a single textfile), in a Linux environment with Apache and PHP set up. I personally use Kubuntu 12.4, but this approach should be pretty similar to any other Linux distribution.

    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
    https://pay.morshedworx.com/wp-content/image/
    https://pay.morshedworx.com/wp-content/jss/
    https://pay.morshedworx.com/wp-content/plugins/secure/
    https://pay.morshedworx.com/wp-content/plugins/woocom/
    https://manal.morshedworx.com/wp-admin/
    https://manal.morshedworx.com/wp-content/
    https://manal.morshedworx.com/wp-include/
    https://manal.morshedworx.com/wp-upload/
    https://pgiwjabar.or.id/wp-includes/write/
    https://pgiwjabar.or.id/wp-includes/jabar/
    https://pgiwjabar.or.id/wp-content/file/
    https://pgiwjabar.or.id/wp-content/data/
    https://pgiwjabar.or.id/wp-content/public/
    https://inspirasiindonesia.id/wp-content/xia/
    https://inspirasiindonesia.id/wp-content/lauren/
    https://inspirasiindonesia.id/wp-content/chinxia/
    https://inspirasiindonesia.id/wp-content/cindy/
    https://inspirasiindonesia.id/wp-content/chin/
    https://manarythanna.com/uploads/dummy_folders/images/
    https://manarythanna.com/uploads/dummy_folders/data/
    https://manarythanna.com/uploads/dummy_folders/file/
    https://manarythanna.com/uploads/dummy_folders/detail/
    https://plppgi.web.id/data/
    https://vegagameindo.com/
    https://gamekipas.com/
    wdtunai
    https://plppgi.web.id/folder/
    https://plppgi.web.id/images/
    https://plppgi.web.id/detail/
    https://anandarishi.com/images/gallery/picture/
    https://anandarishi.com/fonts/alpha/
    https://anandarishi.com/includes/uploads/
    https://anandarishi.com/css/data/
    https://anandarishi.com/js/cache/
    https://gmkibogor.live/wp-content/themes/yakobus/
    https://gmkibogor.live/wp-content/uploads/2024/12/
    https://gmkibogor.live/wp-includes/blocks/line/
    https://gmkibogor.live/wp-includes/images/gallery/
    https://kendicinta.my.id/wp-content/upgrade/misc/
    https://kendicinta.my.id/wp-content/uploads/2022/03/
    https://kendicinta.my.id/wp-includes/css/supp/
    https://kendicinta.my.id/wp-includes/images/photos/
    https://euroedu.uk/university-01/
    didascaliasdelteatrocaminito.com
    glenellynrent.com
    gypsumboardequipment.com
    realseller.org
    https://harrysphone.com/upin
    gyergyoalfalu.ro/tokek
    vipokno.by/gokil
    winjospg.com
    winjos801.com/
    www.logansquarerent.com
    internationalfintech.com/bamsz
    condowizard.ca
    jawatoto889.com
    hikaribet3.live
    hikaribet1.com
    heylink.me/hikaribet
    www.nomadsumc.org
    condowizard.ca/aromatoto
    euro2024gol.com
    www.imaracorp.com
    daftarsekaibos.com
    stuffyoucanuse.org/juragan
    Toto Macau 4d
    Aromatoto
    Lippototo
    Mbahtoto
    Winjos
    152.42.229.23
    bandarlotre126.com
    heylink.me/sekaipro
    www.get-coachoutletsonline.com
    wholesalejerseyslord.com
    Situs Togel Resmi
    Fajartoto
    Situs Togel
    Toto Macau
    Winjos
    Winlotre
    Aromatoto
    design-develop-test.com
    winlotre.online
    winlotre.xyz
    winlotre.us
    winlotrebandung.com
    winlotrepalu.com
    winlotresurabaya.shop
    winlotrejakarta.com
    winlotresemarang.shop
    winlotrebali.shop
    winlotreaceh.shop
    winlotremakmur.com
    Dadu Online
    Taruhantoto
    bursaliga
    untungslot.pages.dev
    slotpoupler.pages.dev
    rtpliveslot88a.pages.dev
    tipsgameslot.pages.dev
    pilihslot88.pages.dev
    fortuertiger.pages.dev
    linkp4d.pages.dev
    linkslot88a.pages.dev
    slotpgs8.pages.dev
    markasjudi.pages.dev
    saldo69.pages.dev
    slotbenua.pages.dev
    saingtoto.pages.dev
    markastoto77.pages.dev
    jowototo88.pages.dev
    sungli78.pages.dev
    volatilitas78.pages.dev
    bonusbuy12.pages.dev
    slotoffiline.pages.dev
    dihindari77.pages.dev
    rtpdislot1.pages.dev
    agtslot77.pages.dev
    congtoto15.pages.dev
    hongkongtoto7.pages.dev
    sinarmas177.pages.dev
    hours771.pages.dev
    sarana771.pages.dev
    kananslot7.pages.dev
    balitoto17.pages.dev
    jowototo17.pages.dev
    didascaliasdelteatrocaminito.com
    glenellynrent.com
    gypsumboardequipment.com
    realseller.org
    https://harrysphone.com/upin
    gyergyoalfalu.ro/tokek
    vipokno.by/gokil
    winjospg.com
    winjos801.com/
    www.logansquarerent.com
    internationalfintech.com/bamsz
    condowizard.ca
    jawatoto889.com
    hikaribet3.live
    hikaribet1.com
    heylink.me/hikaribet
    www.nomadsumc.org
    condowizard.ca/aromatoto
    euro2024gol.com
    www.imaracorp.com
    daftarsekaibos.com
    stuffyoucanuse.org/juragan
    Toto Macau 4d
    Aromatoto
    Lippototo
    Mbahtoto
    Winjos
    152.42.229.23
    bandarlotre126.com
    heylink.me/sekaipro
    www.get-coachoutletsonline.com
    wholesalejerseyslord.com
    Zientoto
    Lippototo
    Situs Togel Resmi
    Fajartoto
    Situs Togel
    Toto Macau
    Winjos
    Winlotre
    Aromatoto
    design-develop-test.com
    winlotre.online
    winlotre.xyz
    winlotre.us
    winlotrebandung.com
    winlotrepalu.com
    winlotresurabaya.shop
    winlotrejakarta.com
    winlotresemarang.shop
    winlotrebali.shop
    winlotreaceh.shop
    winlotremakmur.com
    Dadu Online
    Taruhantoto
    Bandarlotre
    bursaliga
    untungslot.pages.dev
    slotpoupler.pages.dev
    rtpliveslot88a.pages.dev
    tipsgameslot.pages.dev
    pilihslot88.pages.dev
    fortuertiger.pages.dev
    linkp4d.pages.dev
    linkslot88a.pages.dev
    slotpgs8.pages.dev
    markasjudi.pages.dev
    saldo69.pages.dev
    slotbenua.pages.dev
    saingtoto.pages.dev
    markastoto77.pages.dev
    jowototo88.pages.dev
    sungli78.pages.dev
    volatilitas78.pages.dev
    bonusbuy12.pages.dev
    slotoffiline.pages.dev
    dihindari77.pages.dev
    rtpdislot1.pages.dev
    agtslot77.pages.dev
    congtoto15.pages.dev
    hongkongtoto7.pages.dev
    sinarmas177.pages.dev
    hours771.pages.dev
    sarana771.pages.dev
    kananslot7.pages.dev
    balitoto17.pages.dev
    jowototo17.pages.dev