• Hi, Pleskians! We are running a UX testing of our upcoming product intended for server management and monitoring.
    We would like to invite you to have a call with us and have some fun checking our prototype. The agenda is pretty simple - we bring new design and some scenarios that you need to walk through and succeed. We will be watching and taking insights for further development of the design.
    If you would like to participate, please use this link to book a meeting. We will sent the link to the clickable prototype at the meeting.
  • Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

command line mail in chroot

SeanieR

New Pleskian
Is there any way for a client to use command line mail in a script.
Client has ssh access via chromed environment.

Wants their script to be able to send an email on completion.

Any suggestions on how to achieve this?
plesk 12 on Centos6.6

thanks
Seanie
 
Don't know specifically through command line, but a workaround could be create a user, load the script and set crono to run it throught plesk's control panel - using this new user - where an email can be sent every time the script is run.

Regards
 
Of-course it's possible!!!
The basic PHP mail function still works through SHELL + you have SendMail + They can also use SMTP ..
 
Of-course it's possible!!!
The basic PHP mail function still works through SHELL + you have SendMail + They can also use SMTP ..
Hi Abdi

Can you help a bit more please on this?
To give more details from my end, the client has created a bash script to parse a log file, lookup a record and then send off a custom email to a user. They are not using php, so don't think i can suggest that to them, unless its a last option.
They want to be able to use something like this in the bash script:
mail -s 'test subject' -r '[email protected]' [email protected] < msgfile.txt

When you say they have sendmail, what do you mean here? Sendmail is not available in a chroot env. And how can they use SMTP?

Thanks for the help.
Seanie
 
hi
Thanks for the suggestions. Unfortunately, sendemail will not work as it needs perl :
bash: ./sendEmail: /usr/bin/perl: bad interpreter: No such file or directory

I will check out the other suggestions.

Is there any way to add command line mail via the chroot_update.sh script?

thanks
 
Back
Top