Sender name in the format "MAC [mac@yahoo.com]" in mailx command.


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Sender name in the format "MAC [mac@yahoo.com]" in mailx command.
# 1  
Old 09-26-2012
Sender name in the format "MAC [mac@yahoo.com]" in mailx command.

Hi Guys,

I want the sender name in the format of "MAC [mac@yahoo.com]" in the mailx command.

I tried the below command but it is throwing error.

Code:
> mailx -s "Test" -r 'MAC [mac@yahoo.com]' xxx@gmail.com
EOT
[mac@yahoo.com] contains invalid character '['
No such file or directory
. . . message not sent.
xxcd:~>

Can somebody help me out here.

Cheers!!!!

---------- Post updated at 11:48 AM ---------- Previous update was at 11:33 AM ----------

I found the solution.

Code:
mailx -s "Test" -r "MAC <mac@yahoo.com>" xxx@gmail.com

Login or Register to Ask a Question

Previous Thread | Next Thread

2 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

2. UNIX for Dummies Questions & Answers

the "jobs" command on Mac OSX

HI, I am learning the basics of UNIX on my Mac OS X system but whenever I type the "jobs" command I just get the prompt again, with no output. Regardless of how many programmes or activities are processing. Any ideas? (4 Replies)
Discussion started by: peterluxford
4 Replies
Login or Register to Ask a Question
ARP(3pm)						User Contributed Perl Documentation						  ARP(3pm)

NAME
ARP - Perl extension for creating ARP packets SYNOPSIS
use Net::ARP; Net::ARP::send_packet('lo', # Device '127.0.0.1', # Source IP '127.0.0.1', # Destination IP 'aa:bb:cc:aa:bb:cc', # Source MAC 'aa:bb:cc:aa:bb:cc', # Destinaton MAC 'reply'); # ARP operation $mac = Net::ARP::get_mac("eth0"); print "$mac "; $mac = Net::ARP::arp_lookup($dev,"192.168.1.1"); print "192.168.1.1 has got mac $mac "; IMPORTANT Version 1.0 will break with the API of PRE-1.0 versions, because the return value of arp_lookup() and get_mac() will no longer be passed as parameter, but returned! I hope this decision is ok as long as we get a cleaner and more perlish API. DESCRIPTION This module can be used to create and send ARP packets and to get the mac address of an ethernet interface or ip address. send_packet() Net::ARP::send_packet('lo', # Device '127.0.0.1', # Source IP '127.0.0.1', # Destination IP 'aa:bb:cc:aa:bb:cc', # Source MAC 'aa:bb:cc:aa:bb:cc', # Destinaton MAC 'reply'); # ARP operation I think this is self documentating. ARP operation can be one of the following values: request, reply, revrequest, revreply, invrequest, invreply. The default ARP operation is reply. get_mac() $mac = Net::ARP::get_mac("eth0"); This gets the MAC address of the eth0 interface and stores it in the variable $mac. The return value is "unknown" if the mac cannot be looked up. arp_lookup() $mac = Net::ARP::arp_lookup($dev,"192.168.1.1"); This looks up the MAC address for the ip address 192.168.1.1 and stores it in the variable $mac. The return value is "unknown" if the mac cannot be looked up. SEE ALSO
man -a arp AUTHOR
Bastian Ballmann [ Balle@chaostal.de ] http://www.datenterrorist.de COPYRIGHT AND LICENSE
Copyright (C) 2004-2007 by Bastian Ballmann This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.1 or, at your option, any later version of Perl 5 you may have available. perl v5.14.2 2009-04-24 ARP(3pm)