Example #1
0
        $target_path = $target_path . basename($_FILES['file']['name']);
        if (move_uploaded_file($_FILES['file']['tmp_name'], $target_path)) {
            echo "<p>Die Datei " . basename($_FILES['file']['name']) . " wurde erfolgreich hochgeladen!</p>";
            /* echo "<p><img src='./uploads/".basename( $_FILES['file']['name'])."' alt='".basename( $_FILES['file']['name'])."' width='' height='' class='uploadedimage' /></p>"; */
        } else {
            echo "<p>Beim Hochladen der Datei ist ein Fehler aufgetreten, bitte versuchen Sie es erneut!</p>";
        }
    }
    /*	E-Mail ersstellen	*/
    require_once './Rmail/Rmail.php';
    $mail = new Rmail();
    $mail->setHTMLCharset('UTF-8');
    $mail->setFrom('Anzeigenbestellformular <*****@*****.**>');
    $mail->setSubject('regimmo :: Anzeigenbestellung');
    $mail->setHTML($mailtext);
    $mail->setReceipt('*****@*****.**');
    if (isset($_FILES['file']['name']) && $_FILES['file']['name'] != "") {
        $mail->addAttachment(new FileAttachment('./uploads/' . basename($_FILES['file']['name']) . ''));
    }
    $result = $mail->send(array('*****@*****.**', '*****@*****.**', $email));
    /*	Bild wieder löschen	*/
    /*
    if(isset($_FILES['file']['name']) && $_FILES['file']['name']!=""){						
    					    	unlink('./uploads/'.basename( $_FILES['file']['name']).'');
    					    }
    */
} else {
    ?>
				
				<h1>Hiermit bestelle ich verbindlich folgende Anzeigenschaltung</h1>
			
Example #2
0
 */
$mail->setPriority('high');
/**
 * Set the text of the Email
 */
$mail->setText('Sample text');
/**
 * Set the HTML of the email. Any embedded images will be automatically found as long as you have added them
 * using addEmbeddedImage() as below.
 */
$mail->setHTML('<b>Sample HTML</b> <img src="background.gif">');
/**
 * Set the delivery receipt of the email. This should be an email address that the receipt should be sent to.
 * You are NOT guaranteed to receive this receipt - it is dependent on the receiver.
 */
$mail->setReceipt('*****@*****.**');
/**
 * Add an embedded image. The path is the file path to the image.
 */
$mail->addEmbeddedImage(new fileEmbeddedImage('background.gif'));
/**
 * Add an attachment to the email.
 */
$mail->addAttachment(new fileAttachment('example.zip'));
/**
 * Send the email. Pass the method an array of recipients.
 */
$address = '*****@*****.**';
$result = $mail->send(array($address));
?>