Jump to content

Problem with Sending Emails


rowruffdesign

Recommended Posts

Guys i made this PHP mailing code but if i use it i dont get a email

i tried $to = "[email protected]" (example) but it isnt working

 

Can someone give a tip

 

Thanks

 

 

<?php
		//init variables

		$to = "[email protected]";			
		$cf = array();
		$sr = false;

		if(isset($_SESSION['cf_returndata'])){
			$cf = $_SESSION['cf_returndata'];
		 	$sr = true;
		}
            ?>
            <ul id="errors" class="<?php echo ($sr && !$cf['form_ok']) ? 'visible' : ''; ?>">
                <li id="info">Er zijn problemen met het versturen van uw bericht</li>
                <?php 
			if(isset($cf['errors']) && count($cf['errors']) > 0) :
				foreach($cf['errors'] as $error) :
			?>
                <li><?php echo $error ?></li>
                <?php
				endforeach;
			endif;
			?>
            </ul>
            <p id="success" class="<?php echo ($sr && $cf['form_ok']) ? 'visible' : ''; ?>">Bedankt voor uw bericht</p>
            <form method="post" action="process.php">
                <label for="name">Naam: <span class="required">*</span></label>
                <input type="text" id="name" name="name" value="<?php echo ($sr && !$cf['form_ok']) ? $cf['posted_form_data']['name'] : '' ?>" placeholder="Andre Maassen" required autofocus />
                
                <label for="email">Emailadres: <span class="required">*</span></label>
                <input type="email" id="email" name="email" value="<?php echo ($sr && !$cf['form_ok']) ? $cf['posted_form_data']['email'] : '' ?>" placeholder="[email protected]" required />
                
                <label for="telephone">Telefoon: </label>
                <input type="tel" id="telephone" name="telephone" value="<?php echo ($sr && !$cf['form_ok']) ? $cf['posted_form_data']['telephone'] : '' ?>" />
                
                <label for="message">Bericht: <span class="required">*</span></label>
                <textarea id="message" name="message" placeholder="Typ hier uw bericht" required data-minlength="0"><?php echo ($sr && !$cf['form_ok']) ? $cf['posted_form_data']['message'] : '' ?></textarea>
                
                <span id="loading"></span>
                <input type="submit" value="Verstuur" id="submit-button" />
                <p id="req-field-desc"><span class="required">*</span>een verplicht veld</p>
            </form>
            <?php unset($_SESSION['cf_returndata']); ?>

Link to comment
https://forums.phpfreaks.com/topic/244432-problem-with-sending-emails/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.