10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I am trying to send an attachment through UNIX to the mail box. But along with the attachments I am also receiving junk data as a text file, Suppose "Hi" is the subject of the mailx command then along with the attachment I am getting Hi.txt also.
Below are the commands which I used : -
... (15 Replies)
Discussion started by: Alex_Smith
15 Replies
2. UNIX for Advanced & Expert Users
Hi,
I am making a shell script on HP-UX that will do some Oracle db query and fetch data. Then after formatting the output files (there are two files) in a csv format, I want to send them as email attachments. Unfortunately the email contains garbage. I could not find solution to the problem... (13 Replies)
Discussion started by: asutoshch
13 Replies
3. Shell Programming and Scripting
I've this command to run ...
Purpose : Send attachment file with e-mail body...
( E-mail body i read it from text file)
uuencode TEST_FILE.csv TEST_FILE.csv | cat /usr/local/bin/EMAIL_BODY.txt - | mailx -s "TEST Report" -c receiver1@mail.com receiver2@mail.com
Here is the... (2 Replies)
Discussion started by: prash184u
2 Replies
4. Shell Programming and Scripting
Hi everyone,
I'm emailing a spool file to a person using mailx. I'm using uuencode to attach the file to the email. but am getting this error
uuencode: ISO8859-15 to 646 conversion: Invalid argument
Any ideas as to why. The code is below
sqlplus -s user/password@database <<EOF
set... (9 Replies)
Discussion started by: rjsha1
9 Replies
5. Shell Programming and Scripting
i used below code to attach a file but it's not attaching the file but sendinf a simple mail
uuencode ${discord_file} mail_list.txt | mailx -s "TEST MAIL" xxx@yahoo.com (3 Replies)
Discussion started by: punitpa
3 Replies
6. Shell Programming and Scripting
Hi All,
I have a queryin the uuencode option. Actually i need to attach two files in a single mail.
I am aware of attaching a single file using the command below.
(echo " The first file ";uuencode file1 file1) | mailx -s " The files " venkidhadha@in.com
However i am not sure what... (6 Replies)
Discussion started by: venkidhadha
6 Replies
7. UNIX Desktop Questions & Answers
Hi All,
I am using unix's sendmail utility to send mails with attacments. I am using the uuencode command for attachments (zip).
When i send the mails to some account which is configured in the MS outook it opens/unzip the attachments with no problem.
But the same attachments seems to be... (3 Replies)
Discussion started by: manojram
3 Replies
8. Solaris
We are running solaris 9.
I can send emails using mailx with no problems.
I can send attachments using uuencode no problems.
What I can't do is change the name to .txt or .doc or anything else using uuencode. The command I am using is:
uuencode /tmp/AsetReports /tmp/AsetReports.doc | mailx -s... (2 Replies)
Discussion started by: zeekstern
2 Replies
9. UNIX for Dummies Questions & Answers
I have a unix script that compresses a .txt file using gzip command and then sends it by mail using uuencode.
This has been working fine for some time, but lately I've been experiencing some problems, as when I open the mail generated, I don't see the attachment, but instead I get a large amount... (8 Replies)
Discussion started by: mvalonso
8 Replies
10. Shell Programming and Scripting
hi all,
I dont know of this is a duplicate thread, but the thread i started a while ago wasnot posted still. ok my question is i have a shell script named "mail_editck.sh". i have to include some reports in it so that i can get the email when they are done. the syntax goes like this.
... (2 Replies)
Discussion started by: tejasingaraju17
2 Replies
IMAGEGIF(3) 1 IMAGEGIF(3)
imagegif - Output image to browser or file
SYNOPSIS
bool imagegif (resource $image, [string $filename])
DESCRIPTION
imagegif(3) creates the GIF file in filename from the image $image. The $image argument is the return from the imagecreate(3) or imagecre-
atefrom* function.
The image format will be GIF87a unless the image has been made transparent with imagecolortransparent(3), in which case the image format
will be GIF89a.
PARAMETERS
o $
image -An image resource, returned by one of the image creation functions, such as imagecreatetruecolor(3).
o $filename
-The path to save the file to. If not set or NULL, the raw image stream will be outputted directly.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1
Outputting an image using imagegif(3)
<?php
// Create a new image instance
$im = imagecreatetruecolor(100, 100);
// Make the background white
imagefilledrectangle($im, 0, 0, 99, 99, 0xFFFFFF);
// Draw a text string on the image
imagestring($im, 3, 40, 20, 'GD Library', 0xFFBA00);
// Output the image to browser
header('Content-Type: image/gif');
imagegif($im);
imagedestroy($im);
?>
Example #2
Converting a PNG image to GIF using imagegif(3)
<?php
// Load the PNG
$png = imagecreatefrompng('./php.png');
// Save the image as a GIF
imagegif($png, './php.gif');
// Free from memory
imagedestroy($png);
// We're done
echo 'Converted PNG image to GIF with success!';
?>
NOTES
Note
GIF support was removed from the GD library in Version 1.6, and added back in Version 2.0.28. This function is not available between
these versions. For more information, see the GD Project site.
The following code snippet allows you to write more portable PHP applications by auto-detecting the type of GD support which is
available. Replace the sequence header ("Content-Type: image/gif"); imagegif ($im); by the more flexible sequence:
<?php
// Create a new image instance
$im = imagecreatetruecolor(100, 100);
// Do some image operations here
// Handle output
if(function_exists('imagegif'))
{
// For GIF
header('Content-Type: image/gif');
imagegif($im);
}
elseif(function_exists('imagejpeg'))
{
// For JPEG
header('Content-Type: image/jpeg');
imagejpeg($im, NULL, 100);
}
elseif(function_exists('imagepng'))
{
// For PNG
header('Content-Type: image/png');
imagepng($im);
}
elseif(function_exists('imagewbmp'))
{
// For WBMP
header('Content-Type: image/vnd.wap.wbmp');
imagewbmp($im);
}
else
{
imagedestroy($im);
die('No image support in this PHP server');
}
// If image support was found for one of these
// formats, then free it from memory
if($im)
{
imagedestroy($im);
}
?>
Note
As of PHP 4.0.2 you can use the function imagetypes(3) in place of function_exists(3) for checking the presence of the various sup-
ported image formats:
<?php
if(imagetypes() & IMG_GIF)
{
header('Content-Type: image/gif');
imagegif($im);
}
elseif(imagetypes() & IMG_JPG)
{
/* ... etc. */
}
?>
SEE ALSO
imagepng(3), imagewbmp(3), imagejpeg(3), imagetypes(3).
PHP Documentation Group IMAGEGIF(3)