5

मल्टीपार्ट ईमेल मैं दोनों बनाया के साथ रेल ActionMailer का उपयोग करते समय:कोई नाम नहीं लगाव

approve_trade_email.html.erb

और

approve_trade_email.text.erb

मैं प्राप्त कर सकता हूँ मेरे मेल क्लाइंट (मैक ओएसएक्स) में एक अच्छी तरह से HTML स्वरूपित ईमेल, लेकिन एक ही ईमेल के लिए मेरे जीमेल खाते की जांच करते समय मुझे मल्टीपार्ट्स के साथ एक गैर-अटैचमेंट के साथ एक खाली निकाय मिला?

सहायता?

मैं इसे जीमेल में क्यों प्राप्त करूं?

THX

योएल

यहाँ Gmail में NONAME attachement:

----==_mimepart_4eab3a61bb3a8_10583ff27b4e363c43018 
Date: Sat, 29 Oct 2011 01:27:29 +0200 
Mime-Version: 1.0 
Content-Type: text/plain; 
charset=UTF-8 
Content-Transfer-Encoding: 7bit 
Content-Disposition: inline 
Content-ID: <[email protected]ocal.mail> 


Do not to forget to make a donation on our Site: /home/index?path_only=false 


----==_mimepart_4eab3a61bb3a8_10583ff27b4e363c43018 
Date: Sat, 29 Oct 2011 01:27:29 +0200 
Mime-Version: 1.0 
Content-Type: text/html; 
charset=UTF-8 
Content-Transfer-Encoding: 7bit 
Content-Disposition: inline 
Content-ID: <[email protected]ocal.mail> 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 
<head> 
<link href="/assets/powerplants.css" media="screen" rel="stylesheet" type="text/css" /> 

</head> 
<body id="email">  

<p><b>Do not to forget to make a donation on our <a href="/home/index?path_only=false">Site</a>.</b></p> 

</body> 
</html> 
----==_mimepart_4eab3a61bb3a8_10583ff27b4e363c43018-- 
+0

मैं वर्तमान में एक बहुत ही इसी तरह के विन्यास के साथ एक ही समस्या आ रही है, (mail विधि का उपयोग कर) आप एक समाधान मिला नया एपीआई का उपयोग करने के लिए है ? –

उत्तर

2

मैं एक ही समस्या है और समाधान:

यह पुराने ActionMailer एपीआई में एक बग है रेल 3 का, जिसमें मेल हेडर में मल्टीपार्ट सीमा परिभाषा शामिल नहीं है।

देखें: https://github.com/rails/rails/pull/3090

तुम बस

class UserMailer < ActionMailer::Base 
    default :from => "[email protected]" 

    def welcome_email(user) 
    @user = user 
    @url = "http://example.com/login" 
    mail(:to => user.email, :subject => "Welcome to My Awesome Site") 
    end 
end 
+1

यह अब मेल विधि के साथ काम करता है! बहुत धन्यवाद!!! – zabumba

संबंधित मुद्दे