# Mail or mailx command to send email to myself

**URL:** <http://hpc-community.unige.ch/t/mail-or-mailx-command-to-send-email-to-myself/2998>\
**Category:** HPC Technical\
**Created:** [August 24, 2023, 3:17pm UTC](http://hpc-community.unige.ch/t/mail-or-mailx-command-to-send-email-to-myself/2998 "2023-08-24T15:17:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Erica.Lastufka](http://hpc-community.unige.ch/letter_avatar_proxy/v4/letter/e/34f0e0/32.png) [@Erica.Lastufka](http://hpc-community.unige.ch/u/Erica.Lastufka)\
**Post date:** [August 24, 2023, 3:17pm UTC](http://hpc-community.unige.ch/t/mail-or-mailx-command-to-send-email-to-myself/2998/1 "2023-08-24T15:17:37Z")

</div>

Hello, I’ve been trying to email my unige account with a summary of a job (including plots) in a pdf. I have tried both the mail and mailx command, for example:

mailx -s “test” -a report.pdf my.address@unige.ch -v  
this is a test  
EOT

Neither sends an email. The host name is either login01.yggdrasil or node@yggdrasil.

Is there a way I can send an email using the CLI?

Best regards,  
~ Erica

---

<div class="post-metadata">

**Author:** ![Gael.Rossignol](http://hpc-community.unige.ch/user_avatar/hpc-community.unige.ch/gael.rossignol/32/206_2.png) [@Gael.Rossignol](http://hpc-community.unige.ch/u/Gael.Rossignol)\
**Post date:** [September 4, 2023, 9:07am UTC](http://hpc-community.unige.ch/t/mail-or-mailx-command-to-send-email-to-myself/2998/2 "2023-09-04T09:07:09Z")

</div>

Dear Erica,

It’s possible to send email from nodes but you need to respect a lot of rules to permit the mail to arrive in your mailbox.

First is to set sender using your personal unige email adding '-r “sender@unige.ch” ’ to command line.

Best regards,
