Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6600605
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:38:44+00:00 2026-05-25T18:38:44+00:00

Following problem: Whenever I try to sent a HTML-email through rails, it arrives at

  • 0

Following problem: Whenever I try to sent a HTML-email through rails, it arrives at my googlemail-adress as an empty email with the content as an attachment.

I’m not quite sure what I’m doing wrong here.

Setup as follows:

/app/mailers/testmail.rb
class Testmail < ActionMailer::Base
  default :from => "our_adress@our.router"
  default_url_options[:host] = '10.10.8.1'

  def email
    subject 'Willkommen!'
    recipients 'me@googlemail.com'
    from 'our_adress@our.router'
    sent_on Time.now
  end
end

/app/views/testmail/email.html.erb
<p>Dies ist eine <strong>Testmail!</strong></p>

/app/views/testmail/email.text.erb
Dies ist eine Test-Email!

This is what arrives in my Googlemail-Account:

inbox

The first email is what it looks like with with the html.erb and text.erb active, the second one with only text.erb.
Ignore the username “root”, that’s due to a postfix rewrite because of the actual mailer being on another server (emails from the rails server get sent to the mail server which then actually mails them – not my setup 😉

And here’s the raw data from the first email:

Delivered-To: me@googlemail.com
Received: by 10.101.108.3 with SMTP id k3cs279048anm;
    Wed, 21 Sep 2011 04:24:29 -0700 (PDT)
Received: by 10.204.134.8 with SMTP id h8mr508445bkt.11.1316604268267;
    Wed, 21 Sep 2011 04:24:28 -0700 (PDT)
Return-Path: <inet@our_server>
Received: from our_server (our_server. [100.0.0.0])
    by mx.google.com with ESMTP id i7si2877863bke.151.2011.09.21.04.24.27;
    Wed, 21 Sep 2011 04:24:28 -0700 (PDT)
Received-SPF: neutral (google.com: 100.0.0.0 is neither permitted nor denied by best guess record for domain of inet@our_server) client-ip=100.0.0.0;
Authentication-Results: mx.google.com; spf=neutral (google.com: 100.0.0.0 is neither permitted nor denied by best guess record for domain of inet@our_server) smtp.mail=inet@our_server
Received: from zero (our_server [100.0.0.1])
by our_server (Postfix) with SMTP id 4251724B65
for <me@googlemail.com>; Wed, 21 Sep 2011 13:24:26 +0200 (CEST)
Received: by zero (sSMTP sendmail emulation); Wed, 21 Sep 2011 13:24:26 +0200
From: "root" <inet@our_server>
Date: Wed, 21 Sep 2011 13:24:25 +0200
To: me@googlemail.com
Message-ID: <4e79c96a2ed6b_2ba53f7fe85ced9044023@zero.our_router.mail>
Subject: Willkommen!
Mime-Version: 1.0
Content-Type: multipart/alternative
Content-Transfer-Encoding: 7bit

----==_mimepart_4e79c96a1adc0_2ba53f7fe85ced90437f9
Date: Wed, 21 Sep 2011 13:24:26 +0200
Mime-Version: 1.0
Content-Type: text/plain;
 charset=UTF-8
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Content-ID: <4e79c96a28cbb_2ba53f7fe85ced9043891@zero.our_router.mail>

Dies ist eine Test-Email!

----==_mimepart_4e79c96a1adc0_2ba53f7fe85ced90437f9
Date: Wed, 21 Sep 2011 13:24:26 +0200
Mime-Version: 1.0
Content-Type: text/html;
 charset=UTF-8
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Content-ID: <4e79c96a2bd8d_2ba53f7fe85ced90439a1@zero.our_router.mail>

<p>Dies ist eine <strong>Testmail!</strong></p>


----==_mimepart_4e79c96a1adc0_2ba53f7fe85ced90437f9--
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T18:38:45+00:00Added an answer on May 25, 2026 at 6:38 pm

    Okay, found the answer: The above version of assembling the email does NOT include the boundary neccessary. However,

    mail(:to => 'whoever@wheree.ver')
    

    will work and set the correct boundaries.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following problem: I have an HTML textbox ( <input type=text> )
I think I'm not the only one having this problem. Whenever I try to
I'm following Scott Davis' tutorials on developing grails apps, but whenever i try to
Whenever I try uploading to a device from MonoTouch, I get the following console
I'm getting the following error whenever I try to view JSF pages that contain
Whenever I try to make use of the following LINQ to SQL functions in
i am using: windows 7 rails 3.0 whenever i try to run rake db:migrate.
Following problem: I want to render a news stream of short messages based on
The following problem happens on both Safari and Chrome, so probably a WebKit issue.
I have the following problem using subversion: I'm currently working on the trunk of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.