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

  • Home
  • SEARCH
  • 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 7832265
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T12:07:28+00:00 2026-06-02T12:07:28+00:00

I have the following email header: $random_hash = md5(date(‘r’, time())); $headers = array (‘From’

  • 0

I have the following email header:

$random_hash = md5(date('r', time()));
    $headers = array ('From' => $from,
   'To' => $to,
    'Return-Path' => 'info@example.com',
   'Subject' => $subject,
     'Content-Type'=>'multipart/alternative');

I want to send two versions of email in one email. One text and one html.

So I did this:

ob_start(); ?>
 --PHP-alt-<?php echo $random_hash; ?>
    Content-Type: text/plain; charset="iso-8859-1" 
    Content-Transfer-Encoding: 7bit
    Copy and paste: http://example.com/app_dl.php?app_id=<?php echo $_GET[app_id]; ?> to download your $app_name app \r\n
     Want to get tons more hot apps for free! anywhere anytime? Download our app on http://example.com  \r\n
     example.com team;

--PHP-alt-<?php echo $random_hash; ?>  
    Content-Type: text/html; charset="iso-8859-1" 
    Content-Transfer-Encoding: 7bit
     <p><a href='http://example.com/app_dl.php?app_id=<?php echo $_GET[app_id]; ?>'>Click Here</a> to download your <?php echo $app_name_app; ?></p>
     <p>Want to get tons more hot apps for free! anywhere anytime? Download our app on <a href='http://example.com'>example.com</a></p>
     <br/>
     <p>example.com team</p>";


     <?php 
      $bodyHTML =ob_get_clean();

But it doesnt seem to work well..and I wonder why!?!?

  • 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-06-02T12:07:39+00:00Added an answer on June 2, 2026 at 12:07 pm

    In order to create a multipart/alternative message, you need to specify a boundary and separate each part by that boundary. A good boundary string would be something that is highly unlikely to occur in the message part itself, such as a random string generated by sha1(uniqid()). For example:

    MIME-Version: 1.0
    Content-Type: multipart/alternative; boundary=c4d5d00c4725d9ed0b3c8b
    
    --c4d5d00c4725d9ed0b3c8b
    Content-Type: text/plain; charset="iso-8859-1" 
    Content-Transfer-Encoding: 7bit
    
    part1
    
    --c4d5d00c4725d9ed0b3c8b
    Content-Type: text/html; charset="iso-8859-1" 
    Content-Transfer-Encoding: 7bit
    
    <b>part2</b>
    
    --c4d5d00c4725d9ed0b3c8b--
    

    This is specified in RFC 2046, section 5.1.4.

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

Sidebar

Related Questions

I have following syntax in my script to get email address from string. The
I have the following code import smtplib from email.mime.text import MIMEText smtpserver = 'smtp.gmail.com'
I have the following script for sending mails using python import smtplib from email.mime.multipart
Say I have an email class that has the following properties: public string From
I have following condition: How do I send email to example@mail.com on submitButton clicklistener
I have the following function sending an email twice (and I believe running if($result)
I have the following classes: Public Class Email Private Shared ReadOnly EMAIL_REGEX = \b[a-zA-Z]+[a-zA-Z0-9._+-]+@
I have the following: public class Address { public string Email { get; set;
I have the following table: ID (int) EMAIL (varchar(50)) CAMPAIGNID (int) isSubscribe (bit) isActionByUser
I have the following php script sends an email based on parameters returned: <?

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.