リビジョン 0a142321 app/Controller/TopController.php
app/Controller/TopController.php | ||
---|---|---|
128 | 128 |
* contact_complete |
129 | 129 |
*/ |
130 | 130 |
public function contact_complete() { |
131 |
|
|
132 |
$postcode=null; |
|
133 |
$address=null; |
|
134 |
$tel=null; |
|
131 | 135 |
$this->set('contact',$this->Session->read('contact')); |
132 | 136 |
$name = $this->Session->read('contact.ContactValidate.name'); |
133 | 137 |
$mail = $this->Session->read('contact.ContactValidate.email'); |
134 | 138 |
$comment = $this->Session->read('contact.ContactValidate.comment'); |
139 |
if($this->Session->read('contact.ContactValidate.postcode')!= null){ |
|
140 |
$postcode = $this->Session->read('contact.ContactValidate.postcode'); |
|
141 |
} |
|
142 |
if(($this->Session->read('contact.ContactValidate.prefecture'))!= null||($this->Session->read('contact.ContactValidate.address')!= null)){ |
|
143 |
$address = $this->Session->read('contact.ContactValidate.prefecture').$this->Session->read('contact.ContactValidate.address'); |
|
144 |
} |
|
145 |
if($this->Session->read('contact.ContactValidate.tel')!= null){ |
|
146 |
$tel = $this->Session->read('contact.ContactValidate.tel'); |
|
147 |
} |
|
135 | 148 |
$Email = new CakeEmail(); |
136 | 149 |
$Email->charset('ISO-2022-JP'); |
137 | 150 |
$Email->emailFormat('text'); |
138 | 151 |
$Email->template('user_contact'); |
139 |
$Email->viewVars(array('name'=>$name,'comment'=>$comment)); |
|
152 |
$Email->viewVars(array('name'=>$name,'comment'=>$comment,'mail'=>$mail,'postcode'=>$postcode,'address'=>$address,'tel'=>$tel));
|
|
140 | 153 |
$Email->from( MAIL_FROM ); |
141 | 154 |
$Email->to($mail); |
142 | 155 |
$Email->subject('【PictCode】お問い合わせいただき、ありがとうございます。'); |
他の形式にエクスポート: Unified diff