Answers.Body: <p>Look at the bottom lines here to get you started:
  <a href="https://github.com/civicrm/civicrm-core/blob/master/CRM/Mailing/Controller/Send.php" rel="nofollow noreferrer">https://github.com/civicrm/civicrm-core/blob/master/CRM/Mailing/Controller/Send.php</a></p>
  
  <p>i.e.
  <code>$clone = civicrm_api3('Mailing', 'clone', array('id' =&gt; $mid));</code>
  and then follow thru the rest of the code.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-03-31T20:43:46.100Z
Answers.LastActivityDate: 2019-03-31T20:43:46.100Z
Answers.UserDisplayName: Demerit
Answers.Body: <p>We have an extension that does something similar i.e. injects emails into the civimail queue. If your interested drop me a line.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-03-31T21:11:10.337Z
Answers.LastActivityDate: 2019-03-31T21:11:10.337Z
Answers.UserDisplayName: Parvez Saleh
Body: <p>I am trying to write an extension that monthly will send a series of CiviMai emails. Basically, it would be the same if a user went to the <em>Sent</em> mailings and clicked <em>Re-Use</em> and sent the email again without any changes to the email at all. </p>
  
  <p>Obviously, I need the email to be sent the first time but after that, I am not sure how I would use the API to duplicate the email and then schedule it to send. </p>
  
  <p>Any help is greatly appreciated. I am using Drupal 7 and CiviCRM 5.11.</p>
  
  <p>Thanks,
  Josh</p>
  
Tags: <civimail><api>
Title: Programmatically Re-Use CiviMail Emails
ThreadText: # Programmatically Re-Use CiviMail Emails
  
  (Asked by: username_0 on 2019-03-31)
  
  I am trying to write an extension that monthly will send a series of CiviMai emails. Basically, it would be the same if a user went to the *Sent* mailings and clicked *Re-Use* and sent the email again without any changes to the email at all.
  
  Obviously, I need the email to be sent the first time but after that, I am not sure how I would use the API to duplicate the email and then schedule it to send.
  
  Any help is greatly appreciated. I am using Drupal 7 and CiviCRM 5.11.
  
  Thanks,
  username_0
  
  **Tags:** civimail, api
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2019-03-31. Score: 1 | Accepted answer
  
  Look at the bottom lines here to get you started:
  <https://github.com/civicrm/civicrm-core/blob/master/CRM/Mailing/Controller/Send.php>
  
  i.e.
  `$clone = civicrm_api3('Mailing', 'clone', array('id' => $mid));`
  and then follow thru the rest of the code.
  
  
  ---
  
  ### Answer by username_2 on 2019-03-31. Score: 0
  
  We have an extension that does something similar i.e. injects emails into the civimail queue. If your interested drop me a line.
  
  
  ---
  
  