billogram_send_support_mail_callback

The WooCommerce Billogram Integration billogram send support mail callback function.

Description

billogram_send_support_mail_callback(); 

Usage

  1. if ( !function_exists( 'billogram_send_support_mail_callback' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-billogram-integration/woocommerce-billogram2-extended.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = billogram_send_support_mail_callback(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/woocommerce-billogram2-extended.php  
  1. function billogram_send_support_mail_callback() { 
  2.  
  3. //$message = 'Kontakta ' . $_POST['name'] . ' <br>p ' . $_POST['company'] . ' <br>antingen p ' .$_POST['telephone'] .' <br>eller ' . $_POST['email'] . ' <br>gllande: <br>' . $_POST['subject']; 
  4. $message = '<html><body><table rules="all" style="border-color: #91B9F6; width:70%; font-family:Calibri, Arial, sans-serif;" cellpadding="10">'; 
  5. if(isset($_POST['supportForm']) && $_POST['supportForm'] == "support") { 
  6. $message .= '<tr><td align="right">Type: </td><td align="left" colspan="1"><strong>Support</strong></td></tr>'; 
  7. }else{ 
  8. $message .= '<tr><td align="right">Type: </td><td align="left" colspan="1"><strong>Installationssupport</strong></td></tr>'; 
  9. $message .= '<tr><td align="right">Fretag: </td><td align="left">'.$_POST['company'].'</td></tr>'; 
  10. $message .= '<tr><td align="right">Namn: </td><td align="left">'.$_POST['name'].'</td></tr>'; 
  11. $message .= '<tr><td align="right">Telefon: </td><td align="left">'.$_POST['telephone'].'</td></tr>'; 
  12. $message .= '<tr><td align="right">Email: </td><td align="left">'.$_POST['email'].'</td></tr>'; 
  13. $message .= '<tr><td align="right">rende: </td><td align="left">'.$_POST['subject'].'</td></tr>'; 
  14.  
  15. if(isset($_POST['supportForm']) && $_POST['supportForm'] == "support") { 
  16. $options = get_option('woocommerce_billogram_general_settings'); 
  17. $order_options = get_option('woocommerce_billogram_order_settings'); 
  18. $message .= '<tr><td align="right" colspan="1"><strong>Allmnna instllningar</strong></td></tr>'; 
  19. $message .= '<tr><td align="right">Licens-nyckel: </td><td align="left">'.$options['license-key'].'</td></tr>'; 
  20. $message .= '<tr><td align="right">Billogram API-anvndar ID: </td><td align="left">'.$options['api-key'].'</td></tr>'; 
  21. $message .= '<tr><td align="right">Billogram Lsenord: </td><td align="left">'.$options['authorization_code'].'</td></tr>'; 
  22. $message .= '<tr><td align="right">Billogram lge: </td><td align="left">'.$options['billogram-mode'].'</td></tr>'; 
  23. $message .= '<tr><td align="right">Aktivera ORDER synkning: </td><td align="left">'.$options['activate-orders'].'</td></tr>'; 
  24. $message .= '<tr><td align="right">ORDER synkning method: </td><td align="left">'.$options['activate-invoices'].'</td></tr>'; 
  25. $message .= '<tr><td align="right">Aktivera alla bestllningar synkning: </td><td align="left">'.$options['activate-allsync'].'</td></tr>'; 
  26. $message .= '<tr><td align="right">Aktivera PRODUKT synkning: </td><td align="left">'.$options['activate-prices'].'</td></tr>'; 
  27. $message .= '<tr><td align="right" colspan="1"><strong>Orderinstllningar</strong></td></tr>'; 
  28. $message .= '<tr><td align="right">Administrationsavgift: </td><td align="left">'.$order_options['admin-fee'].'</td></tr>'; 
  29. $message .= '<tr><td align="right">Antal dagar till fakturans frfallodatum days: </td><td align="left">'.$order_options['due-days'].'</td></tr>'; 
  30.  
  31. $message .= '</table></html></body>'; 
  32.  
  33.  
  34. $headers = "MIME-Version: 1.0\r\n"; 
  35. $headers .= "Content-type: text/html; charset=utf-8 \r\n"; 
  36. //$headers .= "From:".get_option('admin_email')."\r\n"; 
  37.  
  38. echo wp_mail( 'support@woobill.com', 'Billogram Support', $message , $headers) ? "success" : "error"; 
  39. //die(); // this is required to return a proper result