Facebook Hayran Sayfası Rss Feed Bağış Yapın
AÇIK KAYNAK ÜCRETSİZ E-TİCARET YAZILIMI



Konuyu Gönder  Yeni Cevap 

 
Konuyu Değerlendir
  • 1 Oy - 5 Ortalama
  • 1
  • 2
  • 3
  • 4
  • 5
İletişim Formu Problemi (ÇÖZÜLDÜ)
02-07-2011, 02:12 AM (En son düzenleme: 02-07-2011 13:35 PM betax.)
Mesaj: #1
İletişim Formu Problemi (ÇÖZÜLDÜ)
Arkadaşlar,

Herkese Merhabalar,

Forumda bir süredir bulunuyorum localde bir kaç çalışmam oldu hem buradaki çözüme ulaşmamış problemleri, hemde karşılaştığım problemleri çözmeye çalışarak hem yardımcı olmaya, hemde herkesin ortak problemlerini gidermek amacı ile birşeyler yapmaya çalıştım.

Forumda arattığımızda karşımıza iletişim formu, gitmeyen mail vs diye o kadar çok konu çıkıyor ve çözümsüz kalmış o kadar çok soru var ki bunlar bir türlü aşılamıyor. Konu çözümlerinden çok tartışmalar vs daha fazla... Çözülmeyen bir problemde durum 'Sunucu ile Alakalı' diyerek ya geçiştiriliyor yada kapatılıyor öncelikle şunu belirtmem gerekir ki çözülmeyen problem üzerine yoğunlaşarak yabancı sitelerin desteği ile 'Sunucu ile Alakalı' diye kapatılan yada belirtilen bir çok problemin basitçe çözüldüğünü burada hepimiz gördük. OpenCart forumunda türkçe topluluğu bile mevcut değil adamlar danca, fince, ispanyolca yada herneyse birlik olup problemlerini çözüyorlar bizim forumda işi görülen arkasını dönüp gidiyor, çözdüğü ve herkesin ortak problemi olan bir konuyu atlayıp ta ki bir daha herhangi bir probremle uğraşana kadar da uğramıyor hatta öyle ki aramızda yöneticiler yetersiz, yok cevap vermiyorsunuz vs diye yakınmalara bile şahit oldum. Ücretsiz destek aldığın bir sistemden hiç bir emeğin olmadan bedava aldığın bilgiyi kullanıyorsan karşılığında sende paylaşmalısın doğru olanda bu diye tahmin ediyorum.

Herneyse çok küçük iki satır yazacaktım gerçekten konulara baktıkça sıkıldım ve yazmak istedim.

Herkesin ortak bir problemi mevcut 'İletişim formu' mailler gitti görünüyor fakat herhangi bir posta düşmüyor bu konuyla ilgili olarak verilen cevaplar ;

1- SMTP ayarlarını doğru yaptınız mı? ( SMTP Ayarları doğru yapılmasa kullanıcı maili, uyarı maili, newsletter maili vs gelmeyeceği için doğru yapılmıştır diye tahmin ediyorum.)

2- Sunucu ile alakalı! ( Bu çok basit bir cevap, sunucu ile alakalı olsa diğer üyelik, uyarı vb maillerde gitmez.)

Benzeri bir çok cevap var.

Boş mailler, görünmeyen resimler, thunderbird, outlook vb uygulamalarda maillerin görünmesi, türkçe karakter vb konularla ilgili olarak şurada bir makale yazdım. OC 1.4.9.4 için ve mükemmel çalışıyor.

İletişim formuna gelince neden ve nasıl çalıştığını bir türlü çözemedim bütün dosyaları didik didik ettim,i herşey olması gerektiği gibi.

Gelin birlikte bu problemi ortadan kaldıralım, bu problemi aşan arkadaşlar detayları ile birlikte tecrübeleri burada paylaşsınlar, yeni başlayan yada konu hakkında daha az tecrübesi olan arkadaşlara da yardımcı olalım ama lütfen önce şu problemi ortadan kaldıralım.

Forum yöneticileri de forumda çözüme ulaşmış ve kapatılmış konulardan bir bölüm oluştursalar ve daha fazla yeni konu açılmasa imdat, acil yardım vs gibi Smile

İletişim formu ile ilgili olarak, görüş, çözüm ve önerilerinizi bekliyorum.

İlginiz için şimdiden teşekkür ederim.
Betax

Bu kullanıcının gönderdiği tüm mesajları bul
Teşekkür Et Bu mesaji bir cevapta alıntı yap
[-] Bu gönderi sahibine(betax) 3 kullanıcı teşekkür etti
(07-04-2011), kenan_uo (07-07-2011), TECHNOLOG (07-02-2011)
02-07-2011, 09:36 AM
Mesaj: #2
RE: İletişim Formu Problemi
Merhaba betax kardeşim.
benim de 2 sitemde aynı sorunlar mevcuttu. ama sadece iletişim formu değil, ne siparişler gidiyordu, ne yeni üye kaydında ne de şifremi unuttum kısmında kullanıcıya mail gitmiyordu. urfacarsilari.com için geçici bir çözüm buldum.

Urfacarsilari.com için
1. Sitemin normal versiyonu 1.4.9.5. ben sadece bir kaç dosyayı 1.4.9 versinunun system/library/mail.php dosyasını ve controller/information klasöründeki contact.php ile tema klasöründeki contact.tpl dosyalarını değiştirdim.
2. giden protokolü smtp değil de phpmail yaptığımda gidiyordu.

gelelim store.edessaweb.com'a hangi yöntemi denediysem,
1. urfacarsilari.com da yazdığım aynı dosya değiştirme yöntemini denedim olmadı.
2. smtp değil de php mail yaptım olmadı (hosting firmam sitemin yer aldığı sunucunun phpmail desteklemediğini ileri sürdü ki zaten php mail de olmamıştı).
3. hosting firmamın direktifleri ile hangi yöntemi denediysem olmadı.
4. sitemin ftp sine farklı bir script attım yine olmadı.
5. mail protokollerini daima smtp mail yaptım. sunucu ayarlarını hosting firmanın verdiği şekilde yaptım. olmadı
6. en son siteme farklı bir sitemin sunucu ayarlarını, mail adresini, şifresini vs. kaydettiğimde mail gidiyordu. ama bu defa da bir şey daha vardı. mailler normalde destek@siteadi.com a gitmesi gerekirken. info@edessaweb.com a gitmişti. bunun sebebini araştırdığımda opencartın ilk kurarken hani bir mail adresi ekliyoruz ya o kısımda info@edessaweb.com yazıyordu. yine farklı bir mail sunucu ayarıyla bu defa kendi msn adresimi yazdım. mailler bu defa da msn adresime gidiyordu. Smile

bu şekilde sitemin mail ayarlarından farklı bir ayar eklediğimde iletişim kısmındaki mailler, yeni üye kayıtları ile gönderilen mailler, şifremi unuttum, ürün siparişi gibi mailler sorunsuz gönderiliyor Smile

sonuç olarak her ne kadar forumda arkadaşlarımız size göre lafı kestirip atsa da sunucu problemi desede %99 haklılar. çünkü 2 haftadır bu konuyu araştırıyorum. ve diğer sitelerimde herşey normal ama store.edessaweb.com adlı sitemde mail gönderemiyorum.

not: urfacarsilari.com için kullandığım yöntemde değiştirdiğim dosyalar
1.4.9 versinundaki
system/library/mail.php
catalog/controller/information/contact.php
catalog/vire/theme/temanız/template/information/contact.tpl dosyaları idi. bu şekilde değiştirdiğimde tüm mail sistemi çalıştı. sizde isterseniz deneyebilirsiniz. ama önce yedeğinizi almanızı tavsiye ederim.

Opencart Yazarlar Modülü 3'ü 1 Arada
E-Ticaret Yazılımları
Opencart Tema Template
Bu kullanıcıya email gönder Kullanıcının websitesini ziyaret et Bu kullanıcının gönderdiği tüm mesajları bul
Teşekkür Et Bu mesaji bir cevapta alıntı yap
02-07-2011, 13:07 PM
Mesaj: #3
RE: İletişim Formu Problemi
Merhabalar,

Technolog,

Belirttiğin işlemi yani urfacarsilari.com için gerçekleştirdiğin işlemi denedim fakat malesef çalışmadı. (PhpMail zaten hiçbir şekilde çalışmıyor tek yol SMTP)

Anlattığın ikinci yolu bir daha açıklarsan sevinirim tam olarak anlayamadım.
a sitendeki sunucu ayarlarını b sitendeki sunucu ayarları ile değiştirdin ve sonuç aldın sanırım ?

İlgin için teşekkür ederim, ben de alternatif çözümler araştırmaya devam ediyorum.
Yine de belirttiğin ikinci yolu detaylı açıklarsan belki biraz geliştirip mutlak çözüm yaratabiliriz.

Bu kullanıcının gönderdiği tüm mesajları bul
Teşekkür Et Bu mesaji bir cevapta alıntı yap
02-07-2011, 13:32 PM
Mesaj: #4
RE: İletişim Formu Problemi
Merhaba betax şöyle belirteyim yaptığım yolu
2 tane sitemiz var x ve z siteleri
x sitesinde her şey normal ve opencart yazılımı yok içinde.
z sitemiz ise opencart alt yapılı bir site

ben x sitesindeki mail ayarlarını z sitesine ekledim bunlar

mail protokolü smtp mail
sunucu adresi mail.x.com
kullanıcı adı isim@x.com
şifre *****
port numarası 587
zaman aşımı 5

bu ayarların aynısını z sitesine ekledim. ve sorunsuz çalıştı. üstüne üstlük ikisi de aynı firmaya ait. fakat x sitesinin ki windows z sitesininki sözde yüksek performanslı bir linux hostingi.

şöyle bir durum daha oldu atıyorum yine z sitesinin sunucularında barındırılan aynı bi site daha var bunun adı da s sitesi olsun. s sitesi de yine opencart altyapılı ve mail sorunu var. çünkü s ve z siteleri aynı sunucuda.

bu s sitesinin mail ayarlarını z sitesine ekledim çalışmadı çalışmadı. çünkü ikiside aynı fiziksel sunucudaydı.çalışmaması normaldi.

diğer mesajında da yazdım sunucu kaynaklı olduğunu belirttim bana dönüş mesajları aynen şu şekilde.

"Sunucudaki php mail sorunu ile ilgili bu hafta içerisinde çözüm bulunacaktır.
Gerekli düzenleme yapıldığında eski ayarlarınızla mail gönderebiliyor olacaksınız.
Aksaklık için özür dileriz."

1 haftadır uğraşıyordum sorun sunucu kaynaklıymış.

Opencart Yazarlar Modülü 3'ü 1 Arada
E-Ticaret Yazılımları
Opencart Tema Template
Bu kullanıcıya email gönder Kullanıcının websitesini ziyaret et Bu kullanıcının gönderdiği tüm mesajları bul
Teşekkür Et Bu mesaji bir cevapta alıntı yap
02-07-2011, 13:34 PM
Mesaj: #5
RE: İletişim Formu Problemi
Ve işte çözüm!!!

Arkadaşlar inanın beynim dönüyor şu an, bütün sürümlerin dosyalarını karşılaştırdım!
Mail.php, Contact.php bütün dosyaları tek okuyarak zor ve heyecanlı saatler yaşadım diyebilirim.

Sonunda çözdüm!!!

Buyrun deneyin hep birlikte kullanalım ve artık 'İletişim formu çalışmıyor' mesajlarına bir son verelim Smile

Öncelikle :

Açalım:
/catalog/controller/information/contact.php

Bul:
Code:
$mail->setFrom($this->request->post['email']);

Değiştirelim:
Code:
$mail->setFrom($this->config->get('config_email'));

Bul
Code:
$mail->setText(strip_tags(html_entity_decode($this->request->post['enquiry'], ENT_QUOTES, 'UTF-8')));
Değiştirelim:

Code:
$mail->setText(strip_tags('Email from: ' . $this->request->post['email'] . "\r\n" .html_entity_decode($this->request->post['enquiry'], ENT_QUOTES, 'UTF-8')));

ve sorunu çözmüş oldum.

Teşekkürler,
Betax

Bu kullanıcının gönderdiği tüm mesajları bul
Teşekkür Et Bu mesaji bir cevapta alıntı yap
[-] Bu gönderi sahibine(betax) 5 kullanıcı teşekkür etti
albarakis (07-04-2011), filem (10-22-2011), kaptan deniz (04-10-2012), muzorotti (07-02-2011), TECHNOLOG (07-02-2011)
02-07-2011, 13:40 PM (En son düzenleme: 02-07-2011 13:45 PM TECHNOLOG.)
Mesaj: #6
RE: İletişim Formu Problemi (ÇÖZÜLDÜ)
bu yapyığınız yöntem sadece iletişim formu için ya diğer şifremi unuttum, sipariş maili, yeni üye kaydı vs mailleri ne olacak?

--- malesef yukarıda yazdığın yöntemi denedim çalışmadı.

Opencart Yazarlar Modülü 3'ü 1 Arada
E-Ticaret Yazılımları
Opencart Tema Template
Bu kullanıcıya email gönder Kullanıcının websitesini ziyaret et Bu kullanıcının gönderdiği tüm mesajları bul
Teşekkür Et Bu mesaji bir cevapta alıntı yap
02-07-2011, 13:42 PM (En son düzenleme: 02-07-2011 13:47 PM betax.)
Mesaj: #7
RE: İletişim Formu Problemi (ÇÖZÜLDÜ)
(02-07-2011 13:40 PM)TECHNOLOG demiş ki:  bu yapyığınız yöntem sadece iletişim formu için ya diğer şifremi unuttum, sipariş maili, yeni üye kaydı vs mailleri ne olacak?

Onu da çözdüm Technolog

http://forum.opencart-tr.com/thread-4512.html

Bu linkteki talimatları uygularsanız kullanıcı mailleri, yeni üyelik, sipariş formu, maillerdeki resimleri, toplu mail gönderme, türkçe karakter, thunderbird, outlook, outlook express gibi fonksiyonların tamamını fixleyebilirsiniz.

Bu kullanıcının gönderdiği tüm mesajları bul
Teşekkür Et Bu mesaji bir cevapta alıntı yap
02-07-2011, 13:47 PM
Mesaj: #8
RE: İletişim Formu Problemi (ÇÖZÜLDÜ)
bunu da denemiştim. ancak yine olmamıştı. http://forum.opencart-tr.com/thread-4519...l#pid23224 bu mesajımda belirttiğim gibi benimki sunucu kaynaklı galiba. Sad

Opencart Yazarlar Modülü 3'ü 1 Arada
E-Ticaret Yazılımları
Opencart Tema Template
Bu kullanıcıya email gönder Kullanıcının websitesini ziyaret et Bu kullanıcının gönderdiği tüm mesajları bul
Teşekkür Et Bu mesaji bir cevapta alıntı yap
02-07-2011, 13:48 PM (En son düzenleme: 02-07-2011 13:53 PM betax.)
Mesaj: #9
RE: İletişim Formu Problemi (ÇÖZÜLDÜ)
(02-07-2011 13:40 PM)TECHNOLOG demiş ki:  bu yapyığınız yöntem sadece iletişim formu için ya diğer şifremi unuttum, sipariş maili, yeni üye kaydı vs mailleri ne olacak?

--- malesef yukarıda yazdığın yöntemi denedim çalışmadı.

Kullandığınız sürüm nedir?

Contact. php :

Kod:
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
<?php 
class ControllerInformationContact extends Controller {
	private $error = array(); 
	    
  	public function index() {
		$this->language->load('information/contact');

    	$this->document->title = $this->language->get('heading_title');  
	 
    	if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) {
			$mail = new Mail();
			$mail->protocol = $this->config->get('config_mail_protocol');
			$mail->parameter = $this->config->get('config_mail_parameter');
			$mail->hostname = $this->config->get('config_smtp_host');
			$mail->username = $this->config->get('config_smtp_username');
			$mail->password = $this->config->get('config_smtp_password');
			$mail->port = $this->config->get('config_smtp_port');
			$mail->timeout = $this->config->get('config_smtp_timeout');				
			$mail->setTo($this->config->get('config_email'));
	  		$mail->setFrom($this->config->get('config_email'));
	  		$mail->setSender($this->request->post['name']);
	  		$mail->setSubject(sprintf($this->language->get('email_subject'), $this->request->post['name']));
	  		$mail->setText(strip_tags('Email from: ' . $this->request->post['email'] . "\r\n" .html_entity_decode($this->request->post['enquiry'], ENT_QUOTES, 'UTF-8'))); 
      		$mail->send();

	  		$this->redirect(HTTPS_SERVER . 'index.php?route=information/contact/success');
    	}

      	$this->document->breadcrumbs = array();

      	$this->document->breadcrumbs[] = array(
        	'href'      => HTTP_SERVER . 'index.php?route=common/home',
        	'text'      => $this->language->get('text_home'),
        	'separator' => FALSE
      	);

      	$this->document->breadcrumbs[] = array(
        	'href'      => HTTP_SERVER . 'index.php?route=information/contact',
        	'text'      => $this->language->get('heading_title'),
        	'separator' => $this->language->get('text_separator')
      	);	
			
    	$this->data['heading_title'] = $this->language->get('heading_title');

    	$this->data['text_address'] = $this->language->get('text_address');
    	$this->data['text_telephone'] = $this->language->get('text_telephone');
    	$this->data['text_fax'] = $this->language->get('text_fax');

    	$this->data['entry_name'] = $this->language->get('entry_name');
    	$this->data['entry_email'] = $this->language->get('entry_email');
    	$this->data['entry_enquiry'] = $this->language->get('entry_enquiry');
		$this->data['entry_captcha'] = $this->language->get('entry_captcha');

		if (isset($this->error['name'])) {
    		$this->data['error_name'] = $this->error['name'];
		} else {
			$this->data['error_name'] = '';
		}
		
		if (isset($this->error['email'])) {
			$this->data['error_email'] = $this->error['email'];
		} else {
			$this->data['error_email'] = '';
		}		
		
		if (isset($this->error['enquiry'])) {
			$this->data['error_enquiry'] = $this->error['enquiry'];
		} else {
			$this->data['error_enquiry'] = '';
		}		
		
 		if (isset($this->error['captcha'])) {
			$this->data['error_captcha'] = $this->error['captcha'];
		} else {
			$this->data['error_captcha'] = '';
		}	

    	$this->data['button_continue'] = $this->language->get('button_continue');
    
		$this->data['action'] = HTTP_SERVER . 'index.php?route=information/contact';
		$this->data['store'] = $this->config->get('config_name');
    	$this->data['address'] = nl2br($this->config->get('config_address'));
    	$this->data['telephone'] = $this->config->get('config_telephone');
    	$this->data['fax'] = $this->config->get('config_fax');
    	
		if (isset($this->request->post['name'])) {
			$this->data['name'] = $this->request->post['name'];
		} else {
			$this->data['name'] = '';
		}

		if (isset($this->request->post['email'])) {
			$this->data['email'] = $this->request->post['email'];
		} else {
			$this->data['email'] = '';
		}
		
		if (isset($this->request->post['enquiry'])) {
			$this->data['enquiry'] = $this->request->post['enquiry'];
		} else {
			$this->data['enquiry'] = '';
		}
		
		if (isset($this->request->post['captcha'])) {
			$this->data['captcha'] = $this->request->post['captcha'];
		} else {
			$this->data['captcha'] = '';
		}		
	
		if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/information/contact.tpl')) {
			$this->template = $this->config->get('config_template') . '/template/information/contact.tpl';
		} else {
			$this->template = 'default/template/information/contact.tpl';
		}
		
		$this->children = array(
			'common/column_right',
			'common/footer',
			'common/column_left',
			'common/header'
		);
		
 		$this->response->setOutput($this->render(TRUE), $this->config->get('config_compression'));		
  	}

  	public function success() {
		$this->language->load('information/contact');

		$this->document->title = $this->language->get('heading_title'); 

      	$this->document->breadcrumbs = array();

      	$this->document->breadcrumbs[] = array(
        	'href'      => HTTP_SERVER . 'index.php?route=common/home',
        	'text'      => $this->language->get('text_home'),
        	'separator' => FALSE
      	);

      	$this->document->breadcrumbs[] = array(
        	'href'      => HTTP_SERVER . 'index.php?route=information/contact',
        	'text'      => $this->language->get('heading_title'),
        	'separator' => $this->language->get('text_separator')
      	);	
		
    	$this->data['heading_title'] = $this->language->get('heading_title');

    	$this->data['text_message'] = $this->language->get('text_message');

    	$this->data['button_continue'] = $this->language->get('button_continue');

    	$this->data['continue'] = HTTP_SERVER . 'index.php?route=common/home';

		if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/common/success.tpl')) {
			$this->template = $this->config->get('config_template') . '/template/common/success.tpl';
		} else {
			$this->template = 'default/template/common/success.tpl';
		}
		
		$this->children = array(
			'common/column_right',
			'common/footer',
			'common/column_left',
			'common/header'
		);
		
 		$this->response->setOutput($this->render(TRUE), $this->config->get('config_compression')); 
	}

	public function captcha() {
		$this->load->library('captcha');
		
		$captcha = new Captcha();
		
		$this->session->data['captcha'] = $captcha->getCode();
		
		$captcha->showImage();
	}
	
  	private function validate() {
    	if ((strlen(utf8_decode($this->request->post['name'])) < 3) || (strlen(utf8_decode($this->request->post['name'])) > 32)) {
      		$this->error['name'] = $this->language->get('error_name');
    	}

    	if (!preg_match(EMAIL_PATTERN, $this->request->post['email'])) {
      		$this->error['email'] = $this->language->get('error_email');
    	}

    	if ((strlen(utf8_decode($this->request->post['enquiry'])) < 10) || (strlen(utf8_decode($this->request->post['enquiry'])) > 3000)) {
      		$this->error['enquiry'] = $this->language->get('error_enquiry');
    	}

    	if (!isset($this->session->data['captcha']) || ($this->session->data['captcha'] != $this->request->post['captcha'])) {
      		$this->error['captcha'] = $this->language->get('error_captcha');
    	}
		
		if (!$this->error) {
	  		return TRUE;
		} else {
	  		return FALSE;
		}  	  
  	}
}
?>


Mail.php :

Kod:
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
<?php
final class Mail {
	protected $to;
	protected $from;
	protected $sender;
	protected $subject;
	protected $text;
	protected $html;
	protected $attachments = array();
	public $protocol = 'mail';
	public $hostname;
	public $username;
	public $password;
	public $port = 25;
	public $timeout = 5;
	public $newline = "\n";
	public $crlf = "\r\n";
	public $verp = FALSE;
	public $parameter = '';

	public function setTo($to) {
		$this->to = $to;
	}

	public function setFrom($from) {
		$this->from = $from;
	}

	public function addheader($header, $value) {
		$this->headers[$header] = $value;
	}

	public function setSender($sender) {
		$this->sender = html_entity_decode($sender);
	}

 public function setSubject($subject) {
      $this->subject = '=?UTF-8?B?' . base64_encode($subject) . '?=';
   }

	public function setText($text) {
		$this->text = $text;
		

		
		

	}

	public function setHtml($html) {
		$this->html = $html;
	}

	public function addAttachment($file, $filename = '') {
		if (!$filename) {
			$filename = basename($file);
		}

		$this->attachments[] = array(
			'filename' => $filename,
			'file'     => $file
		);
	}

	public function send() {
		if (!$this->to) {
			exit('Error: E-Mail to required!');
		}

		if (!$this->from) {
			exit('Error: E-Mail from required!');
		}

		if (!$this->sender) {
			exit('Error: E-Mail sender required!');
		}

		if (!$this->subject) {
			exit('Error: E-Mail subject required!');
		}

		if ((!$this->text) && (!$this->html)) {
			exit('Error: E-Mail message required!');
		}

		if (is_array($this->to)) {
			$to = implode(',', $this->to);
		} else {
			$to = $this->to;
		}

		$boundary = '----=_NextPart_' . md5(time());

		$header = '';

		if ($this->protocol != 'mail') {
			$header .= 'To: ' . $to . $this->newline;
			$header .= 'Subject: ' . $this->subject . $this->newline;
		}
		
		$header .= 'Date: ' . date("D, d M Y H:i:s O") . $this->newline;
		//$header .= 'From: "' . $this->sender . '" <' . $this->from . '>' . $this->newline;
		//$header .= 'From: ' . $this->sender . '<' . $this->from . '>' . $this->newline;
		$header .= 'From: ' . '=?UTF-8?B?'.base64_encode($this->sender).'?=' . '<' . $this->from . '>' . $this->newline;
		$header .= 'Reply-To: ' . $this->sender . '<' . $this->from . '>' . $this->newline;
		$header .= 'Return-Path: ' . $this->from . $this->newline;
		$header .= 'X-Mailer: PHP/' . phpversion() . $this->newline;
		$header .= 'MIME-Version: 1.0' . $this->newline;
		$header .= 'Content-Type: multipart/mixed; boundary="' . $boundary . '"' . $this->newline;
		$header .= 'Content-Transfer-Encoding: 8bit' . $this->newline;		
		$header .= $this->newline; 

		if (!$this->html) {
			$message  = '--' . $boundary . $this->newline;
			$message .= 'Content-Type: text/plain; charset="utf-8"' . $this->newline;
			$message .= 'Content-Transfer-Encoding: 8bit' . $this->newline . $this->newline;
			$message .= $this->text . $this->newline;
		} else {
			$message  = '--' . $boundary . $this->newline;
			$message .= 'Content-Type: multipart/alternative; boundary="' . $boundary . '_alt"' . $this->newline . $this->newline;
			$message .= '--' . $boundary . '_alt' . $this->newline;
			$message .= '' . $this->newline;
			$message .= '' . $this->newline;

			if ($this->text) {
				$message .= $this->text . $this->newline;
			} else {
				$message .= '' . $this->newline;
			}

			$message .= '--' . $boundary . '_alt' . $this->newline;
			$message .= 'Content-Type: text/html; charset="utf-8"' . $this->newline;
			$message .= 'Content-Transfer-Encoding: 8bit' . $this->newline . $this->newline;
			$message .= $this->html . $this->newline;
			$message .= '--' . $boundary . '_alt--' . $this->newline;
		}

foreach ($this->attachments as $attachment) { 
         if (file_exists($attachment['file'])) {
            $handle = fopen($attachment['file'], 'r');
            $content = fread($handle, filesize($attachment['file']));
      
            fclose($handle); 
      
            $message .= '--' . $boundary . $this->newline;
            $message .= 'Content-Type: application/octetstream' . $this->newline;   
            $message .= 'Content-Transfer-Encoding: base64' . $this->newline;
            $message .= 'Content-Disposition: attachment; filename="' . basename($attachment['filename']) . '"' . $this->newline;
            $message .= 'Content-ID: <' . basename($attachment['filename']) . '>' . $this->newline . $this->newline;
            $message .= chunk_split(base64_encode($content));
         }
      }

		$message .= '--' . $boundary . '--' . $this->newline;

		if ($this->protocol == 'mail') {
			ini_set('sendmail_from', $this->from);

			if ($this->parameter) {
				mail($to, '=?UTF-8?B?'.base64_encode($this->subject).'?=', $message, $header, $this->parameter);
			} else {
				mail($to, '=?UTF-8?B?'.base64_encode($this->subject).'?=', $message, $header);
			}

		} elseif ($this->protocol == 'smtp') {
			$handle = fsockopen($this->hostname, $this->port, $errno, $errstr, $this->timeout);

			if (!$handle) {
				error_log('Error: ' . $errstr . ' (' . $errno . ')');
			} else {
				if (substr(PHP_OS, 0, 3) != 'WIN') {
					socket_set_timeout($handle, $this->timeout, 0);
				}

				while ($line = fgets($handle, 515)) {
					if (substr($line, 3, 1) == ' ') {
						break;
					}
				}

				if (substr($this->hostname, 0, 3) == 'tls') {
					fputs($handle, 'STARTTLS' . $this->crlf);

					while ($line = fgets($handle, 515)) {
						$reply .= $line;

						if (substr($line, 3, 1) == ' ') {
							break;
						}
					}

					if (substr($reply, 0, 3) != 220) {
						error_log('Error: STARTTLS not accepted from server!');
					}
				}

				if (!empty($this->username)  && !empty($this->password)) {
					fputs($handle, 'EHLO ' . getenv('SERVER_NAME') . $this->crlf);

					$reply = '';

					while ($line = fgets($handle, 515)) {
						$reply .= $line;

						if (substr($line, 3, 1) == ' ') {
							break;
						}
					}

					if (substr($reply, 0, 3) != 250) {
						error_log('Error: EHLO not accepted from server!');
					}

					fputs($handle, 'AUTH LOGIN' . $this->crlf);

					$reply = '';

					while ($line = fgets($handle, 515)) {
						$reply .= $line;

						if (substr($line, 3, 1) == ' ') {
							break;
						}
					}

					if (substr($reply, 0, 3) != 334) {
						error_log('Error: AUTH LOGIN not accepted from server!');
					}

					fputs($handle, base64_encode($this->username) . $this->crlf);

					$reply = '';

					while ($line = fgets($handle, 515)) {
						$reply .= $line;

						if (substr($line, 3, 1) == ' ') {
							break;
						}
					}

					if (substr($reply, 0, 3) != 334) {
						error_log('Error: Username not accepted from server!');
					}

					fputs($handle, base64_encode($this->password) . $this->crlf);

					$reply = '';

					while ($line = fgets($handle, 515)) {
						$reply .= $line;

						if (substr($line, 3, 1) == ' ') {
							break;
						}
					}

					if (substr($reply, 0, 3) != 235) {
						error_log('Error: Password not accepted from server!');
					}
				} else {
					fputs($handle, 'HELO ' . getenv('SERVER_NAME') . $this->crlf);

					$reply = '';

					while ($line = fgets($handle, 515)) {
						$reply .= $line;

						if (substr($line, 3, 1) == ' ') {
							break;
						}
					}

					if (substr($reply, 0, 3) != 250) {
						error_log('Error: HELO not accepted from server!');
					}
				}

				if ($this->verp) {
					fputs($handle, 'MAIL FROM: <' . $this->from . '>XVERP' . $this->crlf);
				} else {
					fputs($handle, 'MAIL FROM: <' . $this->from . '>' . $this->crlf);
				}

				$reply = '';

				while ($line = fgets($handle, 515)) {
					$reply .= $line;

					if (substr($line, 3, 1) == ' ') {
						break;
					}
				}

				if (substr($reply, 0, 3) != 250) {
					error_log('Error: MAIL FROM not accepted from server!');
				}

				if (!is_array($this->to)) {
					fputs($handle, 'RCPT TO: <' . $this->to . '>' . $this->crlf);

					$reply = '';

					while ($line = fgets($handle, 515)) {
						$reply .= $line;

						if (substr($line, 3, 1) == ' ') {
							break;
						}
					}

					if ((substr($reply, 0, 3) != 250) && (substr($reply, 0, 3) != 251)) {
						error_log('Error: RCPT TO not accepted from server!');
					}
				} else {
					foreach ($this->to as $recipient) {
						fputs($handle, 'RCPT TO: <' . $recipient . '>' . $this->crlf);

						$reply = '';

						while ($line = fgets($handle, 515)) {
							$reply .= $line;

							if (substr($line, 3, 1) == ' ') {
								break;
							}
						}

						if ((substr($reply, 0, 3) != 250) && (substr($reply, 0, 3) != 251)) {
							error_log('Error: RCPT TO not accepted from server!');
						}
					}
				}

				fputs($handle, 'DATA' . $this->crlf);

				$reply = '';

				while ($line = fgets($handle, 515)) {
					$reply .= $line;

					if (substr($line, 3, 1) == ' ') {
						break;
					}
				}

				if (substr($reply, 0, 3) != 354) {
					error_log('Error: DATA not accepted from server!');
				}

				fputs($handle, $header . $message . $this->crlf);
				fputs($handle, '.' . $this->crlf);

				$reply = '';

				while ($line = fgets($handle, 515)) {
					$reply .= $line;

					if (substr($line, 3, 1) == ' ') {
						break;
					}
				}

				if (substr($reply, 0, 3) != 250) {
					error_log('Error: DATA not accepted from server!');
				}

				fputs($handle, 'QUIT' . $this->crlf);

				$reply = '';

				while ($line = fgets($handle, 515)) {
					$reply .= $line;

					if (substr($line, 3, 1) == ' ') {
						break;
					}
				}

				if (substr($reply, 0, 3) != 221) {
					error_log('Error: QUIT not accepted from server!');
				}

				fclose($handle);
			}
		}
	}
}
?>



Mail.php ve Contact.php dosyaları mevcut haliyle bunlar sürüm OC 1.4.9.4 bu dosyalar ile dener misiniz?


(02-07-2011 13:47 PM)TECHNOLOG demiş ki:  bunu da denemiştim. ancak yine olmamıştı. http://forum.opencart-tr.com/thread-4519...l#pid23224 bu mesajımda belirttiğim gibi benimki sunucu kaynaklı galiba. Sad

Sunucu ile alakalı olduğunu sanmıyorum, sunucunuz ile görüşmüşsünüz ve çok fazla değişiklik yaptıysanız bir ihtimal... ama sunucunuz sonuçta linux değil mi? php sürüm notlarını isteyin karşılaştıralım eğer bunlarda doğru ise sunucunuzu sıfırlatıp bu dosyaları tekrar deneyelim bu çözüm Open Cart'ın bütün mail vs gibi problemlerine kesin çözüm.

Size yardımcı olabilirim, mail.php ve contact.php dosyalarını dediğim gibi güncelleyin, sonucu bildirin ona göre plan yapalım.

Bu kullanıcının gönderdiği tüm mesajları bul
Teşekkür Et Bu mesaji bir cevapta alıntı yap
02-07-2011, 18:16 PM
Mesaj: #10
RE: İletişim Formu Problemi (ÇÖZÜLDÜ)
merhaba evet mesajınızın başındada söylediğiniz gibi forumda bende bulamamıştım söylediğiniz değişiklikleri yaptım ve çalıştı çokta iyi oldu elinize sağlık
Version 1.4.9.5

mesaj şu şekilde geliyor iletişim formunu şu şekilde doldurursak
Adı: Veli EFENDİ
E-Posta adresi: aliveli@msn.com
Mesajınız: text text text text

Gelen mesaj
Mesaj başlığı : Veli efendi'den mesajınız var
Email from: aliveli@msn.com
text text text text

aynen bu şekilde geliyor bunun web sayfamızdaki iletişim formundan geldiğini bize anımsatacak anlatacak bir kod daha eklememiz mümkünmü mesela mağaza adımızında geçtiği

www.incekarperde.com


eka7a emeklerinden dolayı sonsuz teşekkürler
Bu kullanıcıya email gönder Bu kullanıcının gönderdiği tüm mesajları bul
Teşekkür Et Bu mesaji bir cevapta alıntı yap
[-] Bu gönderi sahibine(muzorotti) 1 kullanıcı teşekkür etti
albarakis (07-04-2011)
Konuyu Gönder  Yeni Cevap 


Benzer Konular...
Konu: Yazar Cevaplar: Gösterim: Son Mesaj
  [KOD] Opencart Watermark [Filigran] Çözüldü zaknebutt 39 9,459 21-04-2012 12:55 PM
Son Mesaj: niTRos001
  [1.5.x] iletişim menüsü eklemek nehirweb 0 82 20-04-2012 17:32 PM
Son Mesaj: nehirweb
Thumbs Up Türk Lirası Sembolü Sorunu Çözüldü ! alyamus 10 754 10-04-2012 22:18 PM
Son Mesaj: alyamus
Wink [ÇÖZÜLDÜ] Para Birimini Ana Sayfada Varsayılan Yapmak! ömnbvc 0 182 23-03-2012 13:39 PM
Son Mesaj: ömnbvc
  /public_html/system/library/cache.php on line 14 Sorun Çözüldü kenanwebtasarim 0 222 04-03-2012 11:32 AM
Son Mesaj: kenanwebtasarim
  Alt kategori resimlerini kaldırmak. [ÇÖZÜLDÜ] bgrbrk 0 219 04-03-2012 03:19 AM
Son Mesaj: bgrbrk
  iletişim ve arama sayfaları hak makroweb 0 163 19-02-2012 23:53 PM
Son Mesaj: makroweb
  SanalPOS Başvuru Formu - ACİL Yardım Oguzz13 34 1,632 07-02-2012 23:11 PM
Son Mesaj: Oguzz13
  Ajax Arama türkçe karakter sorunu.(çözüldü) Lakırtı 0 275 05-02-2012 17:37 PM
Son Mesaj: Lakırtı
  Resim ekleme HATA (ÇÖZÜLDÜ) ferree 3 637 02-02-2012 18:10 PM
Son Mesaj: cuneyt007

Foruma Git:


Bu konuyu görüntüleyen kullanıcı(lar): 2 Ziyaretçi


OpenCart Türkiye | İletişim | En Üste Dön | İçeriğe Dön | Arşiv | RSS Beslemesi | Kullanım Koşulları