Flash Siteden Den Mail Gönderebilmek ?
-
arkadaşlar flash template den mail çıkışını sağlamam gerekiyor.
template içerisinde bununla ilgili 2 tane dosya var..
form03configuration.xml
ve
contact.php
ikisinin de içeriğini size yazsam bana mail çıkışını sağlayacak şekilde düzenlermisiniz...
form03configuration.xml
<?xml version="1.0" encoding="utf-8"?>
<contactFormConfiguration>
<emailTo>your_email@domain.com</emailTo>
<serverProcessorType>php</serverProcessorType>
<serverProcessorFileName>contact</serverProcessorFileName>
<validateRequiredOnly>false</validateRequiredOnly>
<submitFormOnEnter>false</submitFormOnEnter>
<messageSentText>Thank you for your message.</messageSentText>
<messageSentFailedText>Thank you for your message.</messageSentFailedText>
<formProcessingText>processing...</formProcessingText>
<smtpServer>localhost</smtpServer>
<smtpPort>25</smtpPort>
<plainText>false</plainText>
<emailFromSource>4</emailFromSource>
<subjectSource>Contact Form from your site</subjectSource>
<validationErrorMessages>
<message type="fieldIsRequired">{LABEL} is required.</message>
<message type="emailNotValid">{LABEL} - is not valid email address.</message>
<message type="minCharsLimitError">{LABEL} - The specified number of characters in a field is less than a required minimum.</message>
<message type="reqExpError">{LABEL} - The specified string does not match with the regular expression.</message>
<message type="biggerThanMaxError">{LABEL} - The specified number is greater than an acceptable biggest number for this field.</message>
<message type="lowerThanMinError">{LABEL} - The specified number is lower than an acceptable lowest number for this field.</message>
<message type="notANumberError">{LABEL} - The data is not a number.</message>
<message type="negativeError">{LABEL} - The specified number must not be negative.</message>
<message type="minRequirementError">{LABEL} - The minimum number of variants is not selected</message>
<message type="maxRequirementError">{LABEL} - The number of variants selected exceeds the maximum</message>
<message type="shouldBeEqualError">{LABEL} - values do not match</message>
<message type="dateIsNotValidError">{LABEL} - date has wrong format</message>
</validationErrorMessages>
</contactFormConfiguration>contact.php
<?php
//-----------------Getting data sent by flash---------------------
foreach ($_POST as $key => $value){
if ($key != 'mail_to' && $key != 'smtp_server' && $key != 'smtp_port' && $key != 'mail_from' && $key != 'mail_subject' && $key != 'plain_text'){
$mail_body .= '<b>'.str_replace('_',' ',$key).'</b>:<br/>';
$mail_body .= ''.stripslashes($value).'<br/>';
}
}
//-----------------------------------------------------------------
$message = '<html><body>'.$mail_body.'</body></html>'; // mail body
//------------if plain text is set to true removing html tags------
if ($_POST['plain_text']=='true') {
$message = str_replace('<br/>',"\r\n", $message);
$message = strip_tags($message);
//------------------------------------------------------------------
} else {
//----otherwise composing message headers---------------------------
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
//------------------------------------------------------------------
}
//------------setting conf data-------------------------------------
$to = $_POST['mail_to'];
$from = $_POST['mail_from'];
$subject = $_POST['mail_subject'];
$smtp_server = $_POST['smtp_server'];
$smtp_port = $_POST['smtp_port'];
//------------------------------------------------------------------
//---------setting header info--------------------------------------
$headers .= 'To: '.$to. "\r\n";
$headers .= 'From: Site visitor ' .$from. "\r\n";
//------------------------------------------------------------------
if (mail($to, $subject, $message, $headers)){ // sending mail
print('&mail=1'); //succes
} else {
print('&mail=0');//failure
}
?> -
pim bunu yazdı:
-----------------------------
smtp server
port vs. ayarla sadece
-----------------------------hocam bi ayarlayıversen :)
smtp server bilgim mi gerekiyor?
-
up arkadaşlar varmı bir bilen?
-
localde deniyosan çalışmaz hosta atıp direk dene
-
cosmic bunu yazdı:
-----------------------------
localde deniyosan çalışmaz hosta atıp direk dene
-----------------------------hocam şu anki halinde port ayarı filan yapılmadı. bilenler çalışacak şekilde bi yapabilirmi acaba?
-
bende diyorum ki sana xml de smtp falan yazıyo ama php de smtp servera bağlanmayla alakalı bişi yok mail() le yollanıyo mail at hosta çalışır bi ayara gerek yok
-
cosmic bunu yazdı:
-----------------------------
bende diyorum ki sana xml de smtp falan yazıyo ama php de smtp servera bağlanmayla alakalı bişi yok mail() le yollanıyo mail at hosta çalışır bi ayara gerek yok
-----------------------------hocam 4 farklı host ta denedim çalışmıyor :S çalışsa buraya katmazdım :(
-
hocam şunu contact.php nin yanına html olarak kaydedip direk normal formla hostta göndermeyi denermisin
<form name="form1" method="post" action="contact.php">
<input name="mail_to" type="text" value="kime">
<input name="mail_from" type="text" value="kimden">
<input name="mail_subject" type="text" value="subject">
<input type="submit" name="Submit" value="Submit">
</form>
belki flash contacy.php ye post atmıyodur -
edit
-
cosmic bunu yazdı:
-----------------------------
hocam şunu contact.php nin yanına html olarak kaydedip direk normal formla hostta göndermeyi denermisin
< name="mail_to" ="text" value="kime" />
< name="mail_from" ="text" value="kimden" />
< name="mail_subject" ="text" value="subject" />
< name="Submit" ="submit" value="Submit" />
>
belki flash contacy.php ye post atmıyodur
-----------------------------
Hocam templatemonster flash serilerinin hiçbirisi göndermiyor o zaman. şu anda hostla alakalı ufak bir sorun var da deneyemiyorum :( -
@cosmic sayesinde sorunum çözüldü. çok teşekkürler hocam...