10-07-2018
Hello, what have you tried? :-)
Here are some pointers to help you get started:
1. ls -rt | tail -1 to get the last image.
2. Check if it's an image file (and not a dir or symlink, for instance)
3. Email it as attachment.
Hope this helps.
Last edited by balajesuri; 10-07-2018 at 10:56 PM..
Reason: To use code tags
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have been sending an email attachment from my unix box, but keep getting an error? All though the recipient still receives the email and attachment. Will this error cause problems in the future and how to I cure it?
$ uuencode PReSvPRINTER.txt file | mailx -s "File" me@world.com
uuencode:... (1 Reply)
Discussion started by: dbrundrett
1 Replies
2. UNIX for Dummies Questions & Answers
Is there any way we can send file attachemnts through mails from a unix server. Does the 'mail' command have such an option ?? (1 Reply)
Discussion started by: Rohini Vijay
1 Replies
3. Shell Programming and Scripting
Hi
I am new to unix and scripting.I am trying to send a html file as an attachment.
SUBJECT="Type of Exceptions in Application"
TO=Sushovan.Samals@gmail.com
SPOOLFILE=/data/reg/tlogs/Monitor.html
#echo "Send the E-mail message..."
uuencode $SPOOLFILE $SPOOLFILE | mailx -s "$SUBJECT" $TO... (2 Replies)
Discussion started by: sushovan
2 Replies
4. UNIX for Dummies Questions & Answers
Issue on sending a mail with attachment using unix script ?
Below is my code and is working fine and there is a issue in the attachment, the attachment file printing as a text-encripted message in the mail draft box instead of putting as a attachment
(cat $msg; uuencode $attach1 in1.txt ;... (2 Replies)
Discussion started by: gksenthilkumar
2 Replies
5. Shell Programming and Scripting
Hi, I need to send a email as a txt file and i used the commands,
(echo `echo $EMAIL_MSG` ; uuencode "file.txt" "file.txt" ) | mailx -s "$EMAIL_SUBJECT" "$EMAIL_ID"
I received email with a attachment with all data but i get all of them in one row.
For example:
If file.txt contains value... (1 Reply)
Discussion started by: skcvasanth
1 Replies
6. UNIX for Advanced & Expert Users
Hi,
I am using Sun solaris OS unix server
I am trying to send mail with an attachment using below script
cat test.txt;uuencode test.txt test.txt|mailx -s "$subject" someone@somewhere
I m getting mails but with no attachment.
Hence i manipulate the script as below and i am... (2 Replies)
Discussion started by: sv0081493
2 Replies
7. Shell Programming and Scripting
Hi Team,
I have written the following code snippet to send mail with attachment to recipient. But I am getting mail with attachment. But the file is empty. All the 3 Attachment* size is more than 80KB.
Not sure what is wrong in the command.
MSG_BODY1="hi"
LOG_FILE="a/b/c/log1.log"... (2 Replies)
Discussion started by: kmanivan82
2 Replies
8. Shell Programming and Scripting
Hi Everyone,
I am facing problems in sending html mail with attachemnt.
I will able to send mail with attachment (plain text ) using mailx -s and uuencode command and
also html mail without attachment using sendmail option.
However I am not able to send html mail along with attachment.Either... (2 Replies)
Discussion started by: karthik adiga
2 Replies
9. How to Post in the The UNIX and Linux Forums
How to Send a mail with multiple attachment also differenet extension using uuencode in AIX.
Can you please help me. Its so urgent.
Thanks.
Regards,
Swapnil
---------- Post updated at 05:37 AM ---------- Previous update was at 05:35 AM ----------
I have below code. But attachment... (1 Reply)
Discussion started by: Swapnil Mawle
1 Replies
10. Shell Programming and Scripting
Hi guys,
I am trying to send a mail with below command which is working fine. $FilePath_mail have To,From and other information along with mail body which is in HTML format. I want to have image(logo) in the body. So just wanted to send it as an an attachment.
/usr/sbin/sendmail -t <... (1 Reply)
Discussion started by: balakrishnaps
1 Replies
LEARN ABOUT PHP
imagecreatefromxpm
IMAGECREATEFROMXPM(3) 1 IMAGECREATEFROMXPM(3)
imagecreatefromxpm - Create a new image from file or URL
SYNOPSIS
resource imagecreatefromxpm (string $filename)
DESCRIPTION
imagecreatefromxpm(3) returns an image identifier representing the image obtained from the given filename.
Tip
A URL can be used as a filename with this function if the fopen wrappers have been enabled. See fopen(3) for more details on how to
specify the filename. See the "Supported Protocols and Wrappers" for links to information about what abilities the various wrappers
have, notes on their usage, and information on any predefined variables they may provide.
PARAMETERS
o $filename
- Path to the XPM image.
RETURN VALUES
Returns an image resource identifier on success, FALSE on errors.
EXAMPLES
Example #1
Creating an image instance using imagecreatefromxpm(3)
<?php
// Check for XPM support
if(!(imagetypes() & IMG_XPM))
{
die('Support for xpm was not found!');
}
// Create the image instance
$xpm = imagecreatefromxpm('./example.xpm');
// Do image operations here
// PHP has no support for writing xpm images
// so in this case we save the image as a
// jpeg file with 100% quality
imagejpeg($xpm, './example.jpg', 100);
imagedestroy($xpm);
?>
RETURN VALUES
Note
This function is not implemented on Windows platforms.
PHP Documentation Group IMAGECREATEFROMXPM(3)