GithubHelp home page GithubHelp logo

ko31 / mail2linenotify Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 14 KB

This tool is used to forward the message received by email to LINE Notify.

PHP 94.45% Shell 5.55%
linenotify line mail xserver

mail2linenotify's Introduction

Mail to LINE Notify

This tool is used to forward the message received by email to LINE Notify.

Installation

The case of XSERVER

  • Get your access token on LINE Notify.
  • Download mail2linenotify.zip and extract it.
  • Upload mail2linenotify folder to any path on the server.
  • If you want to set up a transfer to [email protected], you can edit /home/[Your XSERVER account name]/example.com/mail/.filter
if ( /^To: .*sample.*/:h )
{
	cc "| /usr/bin/php7.4 /path/to/mail2linenotify/mail2linenotify.php [Your LINE Access Token]"
}

# If you want to send forwarded emails as well, you can use the following instead of the above.
if ( /^To: .*sample.*/:h )
{
	cc "| /usr/bin/php7.4 /path/to/mail2linenotify/mail2linenotify.php [Your LINE Access Token] 1"
}

You can also set up the above from the XSERVER ServerPanel.

mail2linenotify's People

Contributors

ko31 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

mail2linenotify's Issues

Change the way forwarded mail is judged.

Currently, forwarded mail is determined as follows.

            if ( $message->getHeaderValue( HeaderConsts::TO ) !== $message->getHeaderValue( 'Delivered-To' ) ) {
                return;
            }

https://github.com/ko31/mail2linenotify/blob/main/mail2linenotify.php#L85-L87

However, if the destination of the mail is specified as [email protected], [email protected], [email protected], the address of [email protected] will be trapped by the previous condition.

So, I'd like to change the way forwarded mail is judged.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.