Bcc

Status
Niet open voor verdere reacties.

pbd4499

Gebruiker
Lid geworden
29 jun 2009
Berichten
185
Kan iemand laten zien waar de BCC in onderstaande code dient te worden ingevoegd?



Code:
[FONT="Courier New"]global $mosConfig_mailfrom, $mosConfig_fromname;
$this->execPieceByName('ff_InitLib');
$sub = '*** Web Wijzigingsverzoek Telecom ***';
$msg = Chr(13).Chr(13).'Naam: '.ff_getSubmit('iVld1').Chr(13).'Login-ID: '.ff_getSubmit('iVld2').Chr(13).'BU: '.ff_getSubmit('iVld3').Chr(13).'Functie: '.ff_getSubmit('iVld4').Chr(13).'Telefoon: '.ff_getSubmit('iVld5').Chr(13).Chr(13).'Gewenste wijziging: '.Chr(13).ff_getSubmit('iVld7');
$mto = 'zendenaan@domein.nl'

$this->sendMail(
    $mosConfig_mailfrom,
    $mosConfig_fromname.'Wijzigingsform',
    $mto,$sub,$msg);[/FONT]


Liefst had ik ook nog graag een voorbeeld van de controle op ingevulde velden gezien.
 
Laatst bewerkt:
Dit is wel heel erg weinig info..

Welke class gebruik je? Want $this->sendMail() zegt op zich niets.

De Bcc moet als header mee worden gegeven. ;)
 
PHP:
<?php

/**
 * This is the Sendmail handler for Swift Mailer, a PHP Mailer class.
 *
 * @package	Swift
 * @version	>= 2.0.0
 * @author	Chris Corbyn
 * @date	30th July 2006
 * @license http://www.gnu.org/licenses/lgpl.txt Lesser GNU Public License
 *
 * @copyright Copyright &copy; 2006 Chris Corbyn - All Rights Reserved.
 * @filesource
 *
 *   This library is free software; you can redistribute it and/or
 *   modify it under the terms of the GNU Lesser General Public
 *   License as published by the Free Software Foundation; either
 *   version 2.1 of the License, or (at your option) any later version.
 *
 *   This library is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *   Lesser General Public License for more details.
 *
 *   You should have received a copy of the GNU Lesser General Public
 *   License along with this library; if not, write to
 *
 *   The Free Software Foundation, Inc.,
 *   51 Franklin Street,
 *   Fifth Floor,
 *   Boston,
 *   MA  02110-1301  USA
 *
 *    "Chris Corbyn" <chris@w3style.co.uk>
 *
 */

if (!defined('SWIFT_AUTO_DETECT')) define('SWIFT_AUTO_DETECT', -2);

/**
 * Sendmail Connection Class.
 * Connects to a local binary MTA and stores the connections internally
 * @package Swift
 */
class Swift_Connection_Sendmail implements Swift_IConnection
{
	/**
	 * Sendmail Command (full path and arguments)
	 * This can be a different MTA that behaves like sendmail
	 * Exim works here.
	 * @var	string	command
	 */
	public $command = "/usr/sbin/sendmail -bs";
	/**
	 * Sendmail Process handle
	 * @var	resource	handle
	 */
	public $handle;
	/**
	 * Process Pipes from proc_open()
	 * @var	array	pipes
	 */
	public $pipes;
	/**
	 * MTA Read part of I/O for Swift
	 * @var	resource	socket (reference)
	 */
	public $readHook;
	/**
	 * MTA Write part of I/O for Swift
	 * @var	resource	socket (reference)
	 */
	public $writeHook;
	/**
	 * If the server is connected to the MTA.
	 * @var bool connected
	 */
	public $connected = false;
	
	/**
	 * Constructor
	 * @param	string	Sendmail command, optional
	 */
	public function __construct($command=false)
	{
		if ($command == SWIFT_AUTO_DETECT) $command = @trim(`which sendmail`).' -bs';
		if ($command) $this->command = $command;
	}
	/**
	 * Establishes a connection with the MTA
	 * The SwiftInstance Object calls this
	 *
	 * @return	bool	connected
	 */
	public function start()
	{
		return $this->initializeProcess();
	}
	/**
	 * Establishes a connection with the MTA
	 *
	 * @return	bool	connected
	 */
	public function initializeProcess()
	{
		$pipes_spec = array(
			array("pipe", "r"),
			array("pipe", "w"),
			array("pipe", "w")
		);
		$this->handle = @proc_open($this->command, $pipes_spec, $this->pipes);
		
		$this->writeHook =& $this->pipes[0];
		$this->readHook =& $this->pipes[1];
		
		if (!$this->handle) return $this->connected = false;
		else return $this->connected = true;
	}
	/**
	 * Closes the connection with the MTA
	 * Called by the SwiftInstance object
	 *
	 * @return	void
	 */
	public function stop()
	{
		$this->closeProcess();
	}
	/**
	 * Closes the connection with the MTA
	 *
	 * @return	void
	 */
	protected function closeProcess()
	{
		foreach ($this->pipes as $pipe) fclose($pipe);
		if ($this->handle && $this->connected)
		{
			proc_close($this->handle);
			$this->writeHook = false;
			$this->readHook = false;
			$this->connected = false;
		}
	}
	/**
	 * Returns TRUE if we're connected to the MTA
	 */
	public function isConnected()
	{
		return $this->connected;
	}
}

?>
 
opgelost, heb van de maker een nieuwe class gekregen waar wel BCC in is geimplementeerd.
 
Status
Niet open voor verdere reacties.
Steun Ons

Nieuwste berichten

Terug
Bovenaan Onderaan