Mailx sending attachments to personal email, but not SharePoint?
Hello! I am writing a KornShell script that (in addition to other things) sends a file from a Unix directory to a SharePoint directory. However when executing the script there is no sign of the file on the SharePoint.
I have tested the script using my personal email as the destination and the files are sent correctly (as attachments). I have also tried sending an email with attachments to the SharePoint through Outlook and the files are correctly uploaded. There is some sort of disconnect though when attempting to send files to the SharePoint via the script.
My code: Q: Why are the files not being uploaded to the SharePoint and how can I alter the script to properly upload the files?
hi
can i know how to use mailx to send email to my lotus email account?
i wan to send a file in a directory as an attachment and then email to lotus.
can show me the command line to do it? thanks a lot (1 Reply)
Hi all,
I have written a shell script which sends emails with attachments to our clients. All our attachments are simple flat files (.txt format).
The script is working fine and sending the attachments to the mail-ids except that, when i am sending the attachments to non-outlook users (Like... (6 Replies)
I spent some time working this out, with a little help from various forums, and thought the community would like to know :
Here is how you can send an email from a single Unix command line :
/usr/bin/echo "Email text\nNew line\nAnother new line" >x | uuencode sourcefile.txt sourcefile.txt |... (3 Replies)
Hello,
I've search the forum, but I cannot find an answer to my specific question. I'm trying to send some files to my professor. Upon his request, I used the following:
tar -cvf vh.tar vh_part1.c vh_part2.c vh_part3.c vh_part4.c vh_sample_run15.txt uuencode vh.tar vh.tar > proj1 mail... (2 Replies)
Hi,
I have a requirement to save a mail attachment sent from Windows to a Solaris 9 server.
I'm using mailx on the server and have seen a few examples of how to attach a file for sending but none for how to save the attachment when receiving.
I can see the encoded text when I look at... (2 Replies)
hi guys,
I need a shell script to send mail automatically to my personal mail id like xxxx@hotmail.com but while experimenting with "mail" command I faced following problems.
cat text1.txt | mail -s 'test mail' xxxx@hotmail.com
command successfully executed
but while
checking for... (4 Replies)
Hi,
I am executing the following command in order to send a file as an attachment:
mailx -s "Subject" emailID@xyz.com < Testfile.txt
Instead of attaching the file Testfile.txt, it is writing the contents of the file in the email message body. Please advise on how I can send the file as an... (7 Replies)
Hi,
I am trying to send html email using mailx like follow on sh shell (Bourne) on HP-UX:
mailx -s "Test HTML output in outlook
MIME-Version: 1.0
Content-Type: text/html" receiver@host.com < file.txt
Content of file.txt are as follows:
<html>
<h2>An important link to look at!</h2>... (3 Replies)
I have created a shell scripts and wanted to email users multiple attachments using mailx. I noticed that when I do a man on mailx I see and -a option for attachments. When I run a:
mailx -s "test attachments" -a include_file -a exclude_file testuser@mydomain.com
(Interrupt -- one more to... (1 Reply)
Hi,
Im having a bit of an issue with using the uuencode command and sending out an email.
My aim is to send an email out which has a body and also have attachments. Currently I can either get one or the other and not both on the same email.
uuencode... (4 Replies)
Discussion started by: 02JayJay02
4 Replies
LEARN ABOUT PHP
move_uploaded_file
MOVE_UPLOADED_FILE(3) 1 MOVE_UPLOADED_FILE(3)move_uploaded_file - Moves an uploaded file to a new locationSYNOPSIS
bool move_uploaded_file (string $filename, string $destination)
DESCRIPTION
This function checks to ensure that the file designated by $filename is a valid upload file (meaning that it was uploaded via PHP's HTTP
POST upload mechanism). If the file is valid, it will be moved to the filename given by $destination.
This sort of check is especially important if there is any chance that anything done with uploaded files could reveal their contents to
the user, or even to other users on the same system.
PARAMETERS
o $filename
- The filename of the uploaded file.
o $destination
- The destination of the moved file.
RETURN VALUES
Returns TRUE on success.
If $filename is not a valid upload file, then no action will occur, and move_uploaded_file(3) will return FALSE.
If $filename is a valid upload file, but cannot be moved for some reason, no action will occur, and move_uploaded_file(3) will return
FALSE. Additionally, a warning will be issued.
EXAMPLES
Example #1
Uploading multiple files
<?php
$uploads_dir = '/uploads';
foreach ($_FILES["pictures"]["error"] as $key => $error) {
if ($error == UPLOAD_ERR_OK) {
$tmp_name = $_FILES["pictures"]["tmp_name"][$key];
$name = $_FILES["pictures"]["name"][$key];
move_uploaded_file($tmp_name, "$uploads_dir/$name");
}
}
?>
NOTES
Note
move_uploaded_file(3) is both safe mode and open_basedir aware. However, restrictions are placed only on the $destination path as to
allow the moving of uploaded files in which $filename may conflict with such restrictions. move_uploaded_file(3) ensures the safety
of this operation by allowing only those files uploaded through PHP to be moved.
Warning
If the destination file already exists, it will be overwritten.
SEE ALSO is_uploaded_file(3), rename(3), See Handling file uploads for a simple usage example.
PHP Documentation Group MOVE_UPLOADED_FILE(3)