Subversion Repositories SmartDukaan

Rev

Rev 35485 | Rev 35642 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 35485 Rev 35499
Line 12... Line 12...
12
import org.apache.logging.log4j.Logger;
12
import org.apache.logging.log4j.Logger;
13
import org.springframework.beans.factory.annotation.Autowired;
13
import org.springframework.beans.factory.annotation.Autowired;
14
import org.springframework.mail.javamail.JavaMailSender;
14
import org.springframework.mail.javamail.JavaMailSender;
15
import org.springframework.stereotype.Service;
15
import org.springframework.stereotype.Service;
16
 
16
 
-
 
17
import java.time.LocalDate;
17
import java.util.ArrayList;
18
import java.util.ArrayList;
18
import java.util.Arrays;
19
import java.util.Arrays;
19
import java.util.List;
20
import java.util.List;
20
 
21
 
21
@Service
22
@Service
Line 44... Line 45...
44
                        "<strong>GST Number:</strong> " + trialForm.getGstNumber() + "<br><br>" +
45
                        "<strong>GST Number:</strong> " + trialForm.getGstNumber() + "<br><br>" +
45
                        "<strong>Address:</strong><br>" +
46
                        "<strong>Address:</strong><br>" +
46
                        trialForm.getAddressLine1() + "<br>" +
47
                        trialForm.getAddressLine1() + "<br>" +
47
                        (trialForm.getAddressLine2() != null ? trialForm.getAddressLine2() + "<br>" : "") +
48
                        (trialForm.getAddressLine2() != null ? trialForm.getAddressLine2() + "<br>" : "") +
48
                        trialForm.getCity() + ", " + trialForm.getState() + " - " + trialForm.getPincode() + "<br><br>" +
49
                        trialForm.getCity() + ", " + trialForm.getState() + " - " + trialForm.getPincode() + "<br><br>" +
-
 
50
                        "<strong>Date:</strong> " + LocalDate.now() + "<br>" +
49
                        "<strong>Required Actions:</strong><br>" +
51
                        "<strong>Required Actions:</strong><br>" +
50
                        " 1. Verify Details: Validate KYC documents and basic business information.<br>" +
52
                        " 1. Verify Details: Validate KYC documents and basic business information.<br>" +
51
                        " 2. Assess Potential: Check the location feasibility and estimated sales potential.<br>" +
53
                        " 2. Assess Potential: Check the location feasibility and estimated sales potential.<br>" +
52
                        " 3. Assign Territory: Assign the appropriate Area Sales Manager (ASM) and Business Manager (BM) in the system.<br><br>" +
54
                        " 3. Assign Territory: Assign the appropriate Area Sales Manager (ASM) and Business Manager (BM) in the system.<br><br>" +
53
                        "Regards,<br>SmartDukaan Team";
55
                        "Regards,<br>SmartDukaan Team";
Line 66... Line 68...
66
        String applicantName = trialForm.getFirstName() +
68
        String applicantName = trialForm.getFirstName() +
67
                (trialForm.getLastName() != null ? " " + trialForm.getLastName() : "");
69
                (trialForm.getLastName() != null ? " " + trialForm.getLastName() : "");
68
 
70
 
69
        String body =
71
        String body =
70
                "Hi " + applicantName + ",<br><br>" +
72
                "Hi " + applicantName + ",<br><br>" +
71
                        "Aapki <strong>SmartDukaan registration application</strong> humein mil gayi hai.<br><br>" +
73
                        "We have successfully received your <strong>SmartDukaan registration application</strong>.<br><br>" +
-
 
74
 
72
                        "<strong>Current Status:</strong>  <strong>Verification In Progress</strong><br><br>" +
75
                        "<strong>Current Status:</strong> <strong>Verification in Progress</strong><br><br>" +
-
 
76
 
73
                        "Aapki application process ho rahi hai. Account activate karne ke liye, humari team aapke " +
77
                        "Your application is currently under review. Before activating your account, our team is verifying the " +
74
                        "submit kiye gaye documents, business potential aur location verify kar rahi hai.<br><br>" +
78
                        "documents you submitted, your business potential, and your location. Taaki onboarding bilkul smooth " +
-
 
79
                        "aur transparent ho.<br><br>" +
75
 
80
 
76
                        "<strong>What’s Next?</strong><br>" +
81
                        "<strong>What Happens Next?</strong><br>" +
77
                        " 1. Verification process complete ki jaayegi. (Approx. 48 hours)<br>" +
82
                        "1. Our team will complete the verification process (approx. 2–3 days).<br>" +
78
                        " 2. Account approve hote hi, aapke <strong>registered email</strong> par Login ID, Password, " +
83
                        "2. Once approved, you will receive your <strong>Login ID, Password,</strong> and onboarding details " +
79
                        "aur saari details bhej di jaayengi.<br>" +
84
                        "on your registered email address.<br>" +
80
                        " 3. Login karte hi aapka <strong>30-Day Free Trial activate</strong> ho jaayega. <br><br>" +
85
                        "3. Simply log in using these details and start enjoying the <strong>SmartDukaan advantage</strong> immediately.<br><br>" +
-
 
86
 
81
                        "Aur jaankaari ya kisi bhi sahayata ke liye, turant contact kariye <br> " +
87
                        "For any assistance, feel free to contact us:<br>" +
82
                        "<strong> Support:</strong> : " +
88
                        "<strong>Toll-Free:</strong> 1800-270-0273<br>" +
83
                        " 1800-270-0273<br>" +
-
 
84
                        "Ya e-mail kariye :<strong> care@smartdukaan.com </strong><br><br>" +
89
                        "<strong>Email:</strong> care@smartdukaan.com<br><br>" +
-
 
90
 
85
                        "Thank you for choosing <strong>SmartDukaan. </strong>" +
91
                        "Thank you for choosing <strong>SmartDukaan</strong>. We will connect with you shortly.<br><br>" +
86
                        " We will reach out to you shortly.<br><br>" +
-
 
-
 
92
 
87
                        "Regards,<br>" +
93
                        "Regards,<br>" +
88
                        "Team SmartDukaan";
94
                        "Team SmartDukaan";
89
 
95
 
-
 
96
 
90
        String[] emailTo = {trialForm.getEmail()};
97
        String[] emailTo = {trialForm.getEmail()};
91
        String[] cc = {"tarun.verma@smartdukaan.com"};
98
        String[] cc = {"tarun.verma@smartdukaan.com"};
92
        LOGGER.info("RegistrationBody - " + body);
99
        LOGGER.info("RegistrationBody - " + body);
93
        Utils.sendMailWithAttachments(
100
        Utils.sendMailWithAttachments(
94
                mailSender,
101
                mailSender,
95
                emailTo,
102
                emailTo,
96
                cc,
103
                cc,
97
                "Application Received! We are verifying your details.",
104
                "Application Received – Verification in Progress",
98
                body
105
                body
99
        );
106
        );
100
    }
107
    }
101
 
108
 
102
    public void sentMailForTrialUserToSales(TrialForm trialForm) throws Exception {
109
    public void sentMailForTrialUserToSales(TrialForm trialForm) throws Exception {
Line 166... Line 173...
166
        String applicantName = trialForm.getFirstName() +
173
        String applicantName = trialForm.getFirstName() +
167
                (trialForm.getLastName() != null ? " " + trialForm.getLastName() : "");
174
                (trialForm.getLastName() != null ? " " + trialForm.getLastName() : "");
168
 
175
 
169
        String body =
176
        String body =
170
                "Dear " + applicantName + ",<br><br>" +
177
                "Dear " + applicantName + ",<br><br>" +
171
                        "Humne aapki application carefully review ki hai. Hamein khed hai ki " +
178
                        "After a detailed review of your application, we regret to inform you that your " +
172
                        "current eligibility criteria ke basis par aapka <strong>30-day free trial request</strong> " +
179
                        "<strong>30-Day Free Trial request</strong> cannot be approved based on the current " +
173
                        "decline kar diya gaya hai.<br><br>" +
180
                        "eligibility criteria.<br><br>" +
174
 
181
 
175
                        "Agar aap is decision ka reason janna chahte hain ya koi issue resolve karna chahte hain, " +
182
                        "If you would like to understand the reason for this decision or discuss any concerns, " +
176
                        "toh aap humein <strong>care@smartdukaan.com</strong> par email karein ya " +
183
                        "please feel free to reach out to us at <strong>care@smartdukaan.com</strong> or call our " +
177
                        "hamare Toll Free number <strong>1800-270-0273</strong> par call karein.<br><br>" +
184
                        "Toll-Free number <strong>1800-270-0273</strong>.<br><br>" +
178
 
185
 
179
                        "Apply karne ke liye dhanyavaad. Hum aapke future business endeavors ke liye " +
186
                        "Thank you for applying. We wish you continued success in your business journey. " +
180
                        "shubhkamnayein dete hain. Agar future mein humari policies change hoti hain, " +
187
                        "Aur agar future mein humari policies change hoti hain, hum aapse zaroor sampark karenge.<br><br>" +
181
                        "toh hum aapse zaroor contact karenge.<br><br>" +
-
 
182
 
188
 
183
                        "Regards,<br>" +
189
                        "Regards,<br>" +
184
                        "The SmartDukaan Team";
190
                        "Team SmartDukaan";
-
 
191
 
185
 
192
 
186
        String[] emailTo = {trialForm.getEmail()};
193
        String[] emailTo = {trialForm.getEmail()};
187
        String[] cc = {"tarun.verma@smartdukaan.com"};
194
        String[] cc = {"tarun.verma@smartdukaan.com"};
188
 
195
 
189
        Utils.sendMailWithAttachments(
196
        Utils.sendMailWithAttachments(
190
                mailSender,
197
                mailSender,
191
                emailTo,
198
                emailTo,
192
                cc,
199
                cc,
193
                "Update regarding your SmartDukaan Free Trial Request",
200
                "Update on Your SmartDukaan Free Trial Request",
194
                body
201
                body
195
        );
202
        );
196
    }
203
    }
197
 
204
 
198
    public void sendUpgradeRequestMail(TrialForm trialForm) throws Exception {
205
    public void sendUpgradeRequestMail(TrialForm trialForm) throws Exception {
Line 200... Line 207...
200
        String applicantName = trialForm.getFirstName() +
207
        String applicantName = trialForm.getFirstName() +
201
                (trialForm.getLastName() != null ? " " + trialForm.getLastName() : "");
208
                (trialForm.getLastName() != null ? " " + trialForm.getLastName() : "");
202
 
209
 
203
        String body =
210
        String body =
204
                "Dear " + applicantName + ",<br><br>" +
211
                "Dear " + applicantName + ",<br><br>" +
205
                        "SmartDukaan Franchise Partner program mein interest dikhane ke liye dhanyawaad.<br><br>" +
212
                        "Thank you for expressing your interest in the <strong>SmartDukaan Franchise Partner Program</strong>.<br><br>" +
206
 
213
 
207
                        "Humein aapki request mil gayi hai. Humaari team jald hi aapse connect karegi " +
214
                        "We have successfully received your request. Our team will connect with you shortly to discuss the " +
208
                        "taaki hum requirements aur onboarding process ke next steps discuss kar sakein.<br><br>" +
215
                        "requirements, eligibility, and the next steps. Taaki hum milkar ek strong aur long-term partnership " +
-
 
216
                        "build kar saken.<br><br>" +
209
 
217
 
210
                        "Umeed hai ki hum is partnership ko naye level par le jayenge.<br><br>" +
218
                        "We look forward to taking this conversation forward.<br><br>" +
211
 
219
 
212
                        "Regards,<br>" +
220
                        "Regards,<br>" +
213
                        "The SmartDukaan Team";
221
                        "Team SmartDukaan";
-
 
222
 
214
 
223
 
215
        String[] emailTo = {trialForm.getEmail()};
224
        String[] emailTo = {trialForm.getEmail()};
216
        String[] cc = {"tarun.verma@smartdukaan.com"};
225
        String[] cc = {"tarun.verma@smartdukaan.com"};
217
 
226
 
218
        Utils.sendMailWithAttachments(
227
        Utils.sendMailWithAttachments(
219
                mailSender,
228
                mailSender,
220
                emailTo,
229
                emailTo,
221
                cc,
230
                cc,
222
                "We’ve received your interest for SmartDukaan Franchise",
231
                "We’ve Received Your Interest in the SmartDukaan Franchise",
223
                body
232
                body
224
        );
233
        );
225
    }
234
    }
226
 
235
 
227
    public void sendInternalFranchiseUpgradeMail(TrialForm trialForm) throws Exception {
236
    public void sendInternalFranchiseUpgradeMail(TrialForm trialForm) throws Exception {