티스토리 뷰

SWDesk/Web

PHP Mail Example

inhae 2021. 6. 15. 14:52

To send email through PHP

PHPMailer

PHP Email

 

class cMailInfo{
	public $ToMail;
	public $BodyString;
	public $Subject;

	//public function __construct(){}
	public function __construct($EmailAddress, $Subject, $BodyString){
		$this->ToMail = $EmailAddress;
		$this->BodyString = $BodyString;
		$this->Subject = $Subject;
	}


	public function SendNotice($FromMail='zezoup@bilientsvc.net'){
		if($this->ToMail == NULL) return "[?] Mail01";
		if($this->BodyString == NULL) return "[?] Mail02";
		if($this->Subject == NULL) return "[?] Mail03";

		$Headers = "From: ".$FromMail;
		mail($this->ToMail, $this->Subject, $this->BodyString, $Headers);
		return $Headers;
	}

}
반응형
반응형
250x250
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2025/01   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함