No such file or directory. Sending Attachments - email-attachments

I have built a php mail system. now I want to also send attachments whit the email's. I have the files for the attachments uploaded to my server and want it with the following piece of code sent with the email.
<?php
$mail_ontvanger->addAttachment($filesOb->c_file_name, 'home/httpd/vhosts/mysite.nl/subdomains/user/httpdocs/beheer/uploads/', $filesOb->c_file_name);
?>
If I do this I than I get an error: (failed to open stream: No such file or directory in...)
I myself think that the error caused by wrong \ in directory ('home/httpd/vhosts/mysite.nl/subdomains/user/httpdocs/beheer/uploads/'). but this cant not solve the problem.
When I send an email with attachments on then the mail as usual with me in my mail box, only the file is empty.

The error is pretty obvious; it can't find the file you're trying to attach. Maybe it's due to the path being incorrect? Try this:
$mail_ontvanger->addAttachment($filesOb->c_file_name, '/home/httpd/vhosts/mysite.nl/subdomains/user/httpdocs/beheer/uploads/', $filesOb->c_file_name);
In any case, it's better to use relative paths.

Related

Could not access your domain

when I try to install moodle via softaculous, I get an error like this, I just created my domain name and the files seem empty. Can you help?
Eror:
Could not access your domain. Please make sure your domain is pointing to this server and there is no .htaccess file restricting access to your domain
I get the error while loading Moodle, the contents of my files are empty and .there is no htaccess file

Why does view.officeapps.live.com present an error when accessing a file?

**Why does view.officeapps.live.com present an error when accessing a file?
**
Just got disconnected from a Microsoft get-help conversation after the guy couldn't solve the issue.So i take it to the omniscient strangers on the internet.
I am trying to access a file stored on a web server via view.officeapps.live.com . The file is linked bellow v
https://www.fileserver.kweb-systems.ml/Files/kai-young.ml/Personal-CV/CV.pdf
https://view.officeapps.live.com/op/embed.aspx?src=http://www.fileserver.kweb-systems.ml/Files/kai-young.ml/Personal-CV/CV.pdf
The error also occurs on the encrypted link to
https://view.officeapps.live.com/op/embed.aspx?src=https://www.fileserver.kweb-systems.ml/Files/kai-young.ml/Personal-CV/CV.pdf
The file to open in a word online window

Recover email sended through exim?

lost some important data from my server and I know that data was sended via email. I have root access and I need to recover those emails.
I looked into exim logs and I have the email ID, but when I use a command like:
root#server [/var/spool/exim/msglog]# exim -Mvh 1ZfRwk-003bDf-JB
Failed to open input file for 1ZfRwk-003bDf-JB-H: No such file or directory.
Logs looks like:
2015-09-25 08:17:50 1ZfRwk-003bDf-JB <= info#myserver.com U=username P=local S=7453 id=20150925121750.117390002 ...... etc
I am running WHM under centOS
Is possible recover sended mails?
Any help would be appreciated.
No, You can not recover any mail which was send from your server. You can check your 1ZfRwk-003bDf-JB mail logs with the following command so that you can find out full logs of that mail.
grep 1ZfRwk-003bDf-JB /var/log/exim_mainlog

Open a file in a domino server through lotus application

I want to open file from a lotus application that i saved in the my Domino Server (IP : 172.17.0.55) through an action button. I execute the formula below but i have this error message "unable to invoke program":
d:="\\172.17.0.55\folder1\file1.txt";
#Command([Execute]; d)
Folder1 is a shared folder into Data repository : Lotus\Domino\Data
Sharing a subfolder within the Domino server's Data folder is a bad idea.
That said, if you really want to do this, your problem is that Notes's #Command([Execute] does not know anything about your system's default program bindings for file extensions, so you're going to have to use it to launch something that does. I.e., something like this:
d:="cmd.exe /c \\172.17.0.55\folder1\file1.txt"
I recommend (asserting your Domino server run http task) to put the folder1 under html path:
/domino/data/domino/html/folder1
Write there the file1.txt.
To open the file (not edit but only read) open the following URL:
http://dominoserver/folder1/file1.txt
which can be done by
#URLOpen("http://172.17.0.55/folder1/file1.txt")

500 Internal Server error in pastie.el

Im using the pastie.el file located at http://www.emacswiki.org/emacs/download/pastie.el. This is supposed to help us post code to pastie.org directly from emacs.
If the file im pasting contains "<" symbol then i get a 500 Internal Server Error message in emacs,because of which im unable to post ruby files, php files etc.
Any way to fix this in the elisp file ?
Thank You
There is a problem with xml escaping in the pastie.el located on emacswiki.org. I found a working version at https://bitbucket.org/sid0/.emacs/raw/837539ad28ca/elisp-files/pastie.el .