我正在尝试使用PHP,但遇到了一个问题。我正在尝试让我的php脚本发送一封电子邮件,当一个进程已经完成。
<!DOCTYPE html>
<html>
<body>
<?php
echo shell_exec('echo "testing" | mutt -x -F /usr/web/mail.mut -s test -- my_email_here@gmail.com');
?>
<br>
Thanks. PDF copys of energy plots have been emailed.
我目前正在使用它来启动mutt或irssi
urxvt -name Irssi/Mutt screen -r Irssi/Mutt
目前,在使用我的启动程序之前,我必须完成以下操作:
screen -S Irssi/Mutt irssi/mutt + Ctrl-a-d
我想要做的是:
if [ test_to_see_if_the_screen_exit ] # I need a way to the test
then
urxvt -name Irssi/Mutt -e screen -r Irssi/Mutt
else
create_the_screen_named_Irssi/
如果直接从命令行运行,这个简单的脚本(simple_mail.sbatch)将发送两封邮件。它在head节点和我尝试过的任何集群节点上运行都很好:
#!/bin/bash
echo "Getting ready to send an e-mail from $HOSTNAME"
# Try using a pipe
echo 'Testing pipe version' | mailx -s 'testing mail app' user@example.com
# Try using a heredoc
mailx -s 'test
我试着连夜运行一个很长的bash脚本来获取一些数据。我想包括一个脚本,它会在脚本完成后自动通过电子邮件发送文件给我。有没有办法用mutt做到这一点呢?我想要像下面这样的东西:
sh atoms.sh
sh angles.sh
mutt -a atoms.dat angles.dat -- [e-mail adress]
有谁愿意接受吗?
编辑:如果有任何其他方法来实现这一点--“在脚本编写完成后向一个电子邮件地址发送多个附件”--我将非常感激。
当我登录到我的副证件时,
ssh -D 127.0.0.1:1080 root@mydomain.com
root@noxp.info's password:
Linux born 3.2.0-4-686-pae #1 SMP Debian 3.2.65-1+deb7u1 i686
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
i