| Server IP : 52.25.153.185 / Your IP : 216.73.216.95 Web Server : Apache System : Linux ip-172-26-6-158 5.10.0-45-cloud-amd64 #1 SMP Debian 5.10.259-1 (2026-07-02) x86_64 User : daemon ( 1) PHP Version : 8.1.10 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /bitnami/wordpress/wp-content/plugins/fluent-crm/assets/ |
Upload File : |
import{ar as e,Q as t,aw as s,aL as a}from"./vendor-element-plus.js?ver=3.2.0";import{_ as i,I as n}from"./fc-bits-ui.js?ver=3.2.0";import{aR as l,Y as m,Z as _,a4 as c,a5 as d,ae as o,a3 as r,aa as p,ad as f,a7 as h,a2 as g,ac as u}from"./vendor.js?ver=3.2.0";const y=window.fcAdmin.auth.email,b={name:"SendTestEmail",components:{Icons:n},props:{campaign:{type:Object,default:()=>({})},btn_text:{type:String,default:()=>""},btn_type:{type:String,default:()=>"default"},placement:{type:String,default:()=>"top"},btn_class:{type:String,default:()=>""},showIcon:{type:Boolean,default:()=>!0}},data:()=>({sending_test:!1,test_email:y}),methods:{sendTestEmail(){if(!this.campaign.email_body)return this.$notify.error({title:this.$t("Oops!"),message:this.$t("Cam_Please_peb"),offset:19});const e=(this.test_email||"").trim();if(e&&!/^[^\s@,;<>]+@[^\s@,;<>]+\.[^\s@,;<>]+$/.test(e))return this.$notify.error({title:this.$t("Oops!"),message:this.$t("Please provide a single valid email address"),offset:19});this.test_email=e,window.last_fc_test_email=this.test_email,this.sending_test=!0,this.$post("campaigns/send-test-email",{campaign:{id:this.campaign.id,settings:this.campaign.settings,email_subject:this.campaign.email_subject,subjects:this.campaign.subjects||[],email_pre_header:this.campaign.email_pre_header,email_body:this.campaign.email_body,design_template:this.campaign.design_template},test_campaign:"yes",email:this.test_email}).then(e=>{this.$notify.success(e.message)}).catch(e=>{this.handleError(e)}).finally(()=>{this.sending_test=!1})}},mounted(){window.last_fc_test_email&&(this.test_email=window.last_fc_test_email)}},v={class:"fcrm_send_test_email_content"},$={class:"fcrm_send_test_email_content_header"},w={class:"fcrm_send_test_email_title"},S={class:"fcrm_send_test_email_description"},j={class:"fcrm_send_test_email_content_footer"},E={class:"fcrm_send_test_email_input_wrap"},I={class:"fcrm_input_hint"},k={class:"icon"},C={key:0,class:"icon"};const T=i(b,[["render",function(i,n,y,b,T,x){const A=e,O=t,P=l("Icons"),V=a,B=s;return m(),_(V,{placement:y.placement,width:"400","popper-class":"fcrm_send_test_email_popover",trigger:"click"},{reference:c(()=>[r(O,{type:y.btn_type,class:h(y.btn_class)},{default:c(()=>[y.showIcon?(m(),g("span",C,[r(P,{"icon-name":"paperPlane"})])):u("",!0),f(" "+o(y.btn_text||i.$t("Send a test email")),1)],void 0,!0),_:1},8,["type","class"])]),default:c(()=>[d("div",v,[d("div",$,[d("h3",w,o(i.$t("Send a test email")),1),d("p",S,o(i.$t("Cam_Type_cetstolbtsc")),1)]),d("div",j,[d("div",E,[r(A,{placeholder:i.$t("Email Address"),modelValue:T.test_email,"onUpdate:modelValue":n[0]||(n[0]=e=>T.test_email=e)},null,8,["placeholder","modelValue"]),p((m(),_(O,{disabled:T.sending_test,onClick:n[1]||(n[1]=e=>x.sendTestEmail()),type:"primary"},{default:c(()=>[f(o(i.$t("Send")),1)],void 0,!0),_:1},8,["disabled"])),[[B,T.sending_test]])]),d("p",I,[d("span",k,[r(P,{"icon-name":"el-icon-info"})]),f(" "+o(i.$t("Some_SmartCode_Not_Work_Alert")),1)])])])],void 0),_:1},8,["placement"])}]]);export{T as S};