Click here to Skip to main content
15,891,597 members
Home / Discussions / Linux, Apache, MySQL, PHP
   

Linux, Apache, MySQL, PHP

 
GeneralRe: Beginner ask some questions ? Pin
Honeyboy_205-Oct-10 4:42
Honeyboy_205-Oct-10 4:42 
GeneralRe: Beginner ask some questions ? Pin
User 17164925-Oct-10 5:05
professionalUser 17164925-Oct-10 5:05 
Questionlinux Pin
sheronici3-Oct-10 6:13
sheronici3-Oct-10 6:13 
AnswerRe: linux Pin
LloydA11111-Dec-10 10:13
LloydA11111-Dec-10 10:13 
AnswerRe: linux Pin
LloydA11120-Dec-10 6:46
LloydA11120-Dec-10 6:46 
AnswerRe: linux Pin
Iranian MM7-Sep-11 6:41
Iranian MM7-Sep-11 6:41 
QuestionSend attachment through email Pin
DinoRondelly22-Sep-10 7:50
DinoRondelly22-Sep-10 7:50 
AnswerRe: Send attachment through email Pin
DinoRondelly22-Sep-10 8:45
DinoRondelly22-Sep-10 8:45 
I have figured out the issue i was a little off but got it working with the following code.
$to = "Brad.Harris@prosodiecrm.com";
		
		$from = "John Do<WhoCares@Cant.com>";
		
		$subject = "Test Email With WAV";
		
		$message = "This is your test email";
		
		$fileatt = "Removed\E1002.wav";
		
		$fileatt_name = "E1002.wav";
		
		$type = "audio/x-wav";
		
		$name = "E1002.wav";
		
		$headers = "From: $from";
		
		//Add MIME content 
		$semi_rand = md5( time() );
		
		$mime_boundary="==Multipart_Boundary_x".md5(mt_rand())."x";

	   $headers = "From: $from\r\n" .
	   "MIME-Version: 1.0\r\n" .
	   "Content-Type: multipart/mixed;\r\n" .
	   " boundary=\"{$mime_boundary}\""; 
		
		$message = "This is an example" ;
		
   		$message = "This is a multi-part message in MIME format.\n\n" .
      	"--{$mime_boundary}\n" .
      	"Content-Type: text/plain; charset=\"iso-8859-1\"\n" .
      	"Content-Transfer-Encoding: 7bit\n\n" .
   		$message . "\n\n";
   		
		//Open File
		$file = fopen( $fileatt, 'rb');
		
		$data = fread( $file, filesize( $fileatt ) );
		
		fclose( $file );
		
		$data = chunk_split(base64_encode($data));
		
         $message .= "--{$mime_boundary}\n" .
            "Content-Type: {$type};\n" .
            " name=\"{$name}\"\n" .
            "Content-Disposition: attachment;\n" .
            " filename=\"{$fileatt_name}\"\n" .
            "Content-Transfer-Encoding: base64\n\n" .
         $data . "\n\n";
		
         $message.="--{$mime_boundary}--\n";
         
		//Send Email
		$mail_sent = mail($to,$subject,$message,$headers);
		
		//if the message is sent successfully print "Mail sent". Otherwise print "Mail failed" 
		echo $mail_sent ? "Mail sent" : "Mail failed";

QuestionHow to execute a URL in cron job at Linux Server Pin
Varun Sareen21-Sep-10 18:52
Varun Sareen21-Sep-10 18:52 
AnswerRe: How to execute a URL in cron job at Linux Server Pin
cjoki22-Sep-10 4:51
cjoki22-Sep-10 4:51 
GeneralRe: How to execute a URL in cron job at Linux Server Pin
Varun Sareen22-Sep-10 21:14
Varun Sareen22-Sep-10 21:14 
GeneralRe: How to execute a URL in cron job at Linux Server Pin
cjoki23-Sep-10 5:58
cjoki23-Sep-10 5:58 
GeneralRe: How to execute a URL in cron job at Linux Server Pin
Varun Sareen23-Sep-10 7:25
Varun Sareen23-Sep-10 7:25 
GeneralRe: How to execute a URL in cron job at Linux Server Pin
cjoki23-Sep-10 11:58
cjoki23-Sep-10 11:58 
GeneralRe: How to execute a URL in cron job at Linux Server Pin
Varun Sareen23-Sep-10 18:47
Varun Sareen23-Sep-10 18:47 
GeneralRe: How to execute a URL in cron job at Linux Server Pin
markkuk24-Sep-10 0:07
markkuk24-Sep-10 0:07 
GeneralRe: How to execute a URL in cron job at Linux Server [modified] Pin
cjoki24-Sep-10 4:34
cjoki24-Sep-10 4:34 
GeneralHow to execute a URL in cron job at Linux Server Pin
Varun Sareen28-Sep-10 20:37
Varun Sareen28-Sep-10 20:37 
QuestionUTF-8 format with mail() Pin
grmihel220-Sep-10 4:30
grmihel220-Sep-10 4:30 
Questionhtml in database Pin
AndyInUK15-Sep-10 23:32
AndyInUK15-Sep-10 23:32 
AnswerRe: html in database Pin
Gerben Jongerius16-Sep-10 2:04
Gerben Jongerius16-Sep-10 2:04 
GeneralRe: html in database Pin
AndyInUK16-Sep-10 2:07
AndyInUK16-Sep-10 2:07 
GeneralRe: html in database Pin
cjoki16-Sep-10 7:53
cjoki16-Sep-10 7:53 
AnswerRe: html in database Pin
Luc Pattyn16-Sep-10 9:31
sitebuilderLuc Pattyn16-Sep-10 9:31 
Questionsessions Pin
AndyInUK14-Sep-10 7:08
AndyInUK14-Sep-10 7:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.