I'm new in php and i try send mail, but...
if(isset($_POST['apmoketi'])){
$admin_email = "silumospausaulis@gmail.com";
$subject ='Užsakymas';
$comment = 'Jūsų užsakymas priimtas.'
//send email
mail( $subject, "RSVP from WC Entry Form",
"From: $admin_email, \n Name: $vardas $pavarde \n
Miestas: $miestas \n
Address: $postal \n ");
//Email response
echo "Thank you for contacting us!";}
I have change settings in php.ini
[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP=smtp.gmail.com
;SMTP=smtp.mail.yahoo.com
; http://php.net/smtp-port
smtp_port=587
;smtp_port=587
; For Win32 only.
; http://php.net/sendmail-from
sendmail_from=silumospausaulis@gmail.com
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
; http://php.net/sendmail-path
sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"
and in sendmail.ini
smtp_server=smtp.gmail.com
smtp_port=587
smtp_ssl=auto
error_logfile=error.log
debug_logfile=debug.log
pop3_server=
pop3_username=
pop3_password=
force_recipient=
hostname=
Error:-
syntax error, unexpected 'mail' (T_STRING) in C:\xampp\htdocs\ch.php on line 35
Any one can help with it?