Not able to attach a particular excel report in unix server using mailx command

Not able to attach a particular excel report in unix server using mailx command .
Is there any reason why the excel cannot be sent by email? This has worked in past but suddenly it is not working.

Hello,

Welcome to the forum ! If you can provide us with more information, then we may be able to assist you. At a minimum, we'd need to know your operating system and version (e.g. Solaris 10, Ubuntu 20.04 LTS, etc), the complete text of the exact command you are typing, and the full error message or other output that you get back. If you can provide these things in their entirety then others may have a chance of being able to help you, since as things stand there isn't really much information to go on here.

1 Like

Operating system is Red Hat Linux and version 7.9
command used:echo "test-hello" | mailx -s "test mail" -a report.xls "mail id"
The report was previously able to send in mail from linux server but now not received any emails when attaching this particular report.No error message also shown.

Hello,

Thank you for getting back to us with that information. I would say your basic syntax appears correct here, and from a quick test on a CentOS 7 server that exact form of mailx command certainly worked as I would have expected, and I received a test e-mail with an attachment.

So, that then tends to point to your problem being elsewhere. Most likely, your e-mail is being filtered out at some point along the way by a spam filter or similar. What you'd need to do here is to check the mail logs for your system (most likely /var/log/maillog if you are using one of the default RHEL-provided MTAs) to see what happened to your e-mail. If you can see it left your system successfully, then you'd have to follow up with the maintainers of the next mail server that it went to to see what happened to the e-mail after they received it. Oh, and of course do check your junk mail folder and your own mail client's spam filters, since those could be behind this as well.

Hope this helps !

1 Like

If you can confirm that other mails with different attachments get through, that could indicate your .xls contains a character (combination) with a special meaning to the mailing layers.
You could try uuencodeing or base64ing it before attaching, but that might raise problems on the receiving side.

1 Like