Results 1 to 10 of 10

Thread: [Howto] Esmtp Email, PHP, Reminder, send_logfile

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2007
    Location
    Austria
    Posts
    1,336

    Post [Howto] Esmtp Email, PHP, Reminder, send_logfile

    How to send emails and use php-mail and now perl-mail from your asus:
    precondition: installation according wengi's howto. Further an extra email account with any provider. The provider must have a regular mailserver. Please ensure, that all account datas are available.
    If you want to use emails with php and/or perl, you need a wengi installation and install your webserver, mysql and php according wpte's howto.
    WinSCP, Putty, mc or nano or vi is called editor
    Preamble: in this howto we use esmtp. I never had success with sendmail. But esmtp has a aquivalent sendmail syntax, so we can use it for everything.
    It is very easy to install and easy to use, even for multiple accounts.
    For more informations just google....

    INSTALLATION:
    Code:
    ipkg update
    ipkg install esmtp
    touch /opt/etc/esmtprc
    vi /opt/etc/esmtprc   #switch to insert mode
    
    identity accountname@testdomain.com
            hostname smtpserver.testdomain.com:25
            username "accountname@testdomain.com"
            password "accountpassword"
    #save the file
    
    cd /tmp/local/root
    touch email
    vi email   #switch to insert mode
         date: 29.05.2011
         to: anyemailname@domain.com
         subject: Test-email
         from: accountname@testdomain.com
    
         This is a testmail from the asus router
    #save the file
    
    esmtp -t < email
    The identity is your new account which you must have.
    The hostname must be a valid smtp server of your/any provider.
    The username is your accountname (usually your email-name)
    Password is your password of you emailaccount.
    The used emailaddress (anyemail@domain.com) in file email must be a valid address.

    Check that you have received your email
    Consider, this way you can send for instance your logfile daily with the help of cron.
    Or you can install a simple to use reminder system.
    Further, you can use your esmtp-mail as default mailsystem with PHP.

    Just to show you, how you can use your mailsystem you will find some script-code for your shell below as well as how to configure PHP and php tests.
    Further, you will find now a short introduction of using perl-mail with a perl test page.

    Have fun
    Last edited by newbiefan; 24-06-2011 at 22:09. Reason: howto perl-mail added
    Alle HowTo's, all howto's

    RT-N16 1.9.2.7-rtn-r3121, Samba, VSFTP, Lightthpd, PHP, Perl, MySQL, Serendipity, Aria2web, HDD 640GB
    RT-N66U, 16GB MicroSD/ 2 Partitions, 2,5" HDD 1TB, running with Merlin's FW and Entware, 16 Mbit A1,
    Netgear DGND 3700V2, QNAP TS119PII 4 TB, QNAP TS209 2 TB Raid1, Backup Synology DS107+ 1 TB, HP CP1515n

Similar Threads

  1. Îòïðàâêà IP àäðåñà WAN èíòåðôåéñà ïî SMS è eMail
    By ncat in forum Russian Discussion - РУССКИЙ (RU)
    Replies: 30
    Last Post: 20-03-2013, 16:14
  2. Powiadomienia na email rtorrent+nail
    By jabol.91 in forum Polish Discussion - Polski (PL)
    Replies: 2
    Last Post: 15-11-2011, 12:48
  3. Email from router
    By Googol in forum WL-500g Q&A
    Replies: 33
    Last Post: 26-08-2010, 07:32
  4. [How-To] Send email with php function
    By cichy in forum WL-500gP Tutorials
    Replies: 3
    Last Post: 11-09-2009, 16:01
  5. esmtp remove Message-Id in the body of the mail
    By boobax in forum WL-500g Q&A
    Replies: 3
    Last Post: 11-02-2008, 07:49

Tags for this Thread

Posting Permissions

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