|
| 1 | +const contactFormTemplate = ({ |
| 2 | + name, |
| 3 | + email, |
| 4 | + phone, |
| 5 | + message, |
| 6 | +}: { |
| 7 | + name: string |
| 8 | + email: string |
| 9 | + phone: string |
| 10 | + message: string |
| 11 | +}): string => { |
| 12 | + return ` |
| 13 | + <table style="border: 1px solid #ddd; padding: 16px; border-radius: 8px; background-color: #f9f9f9; max-width: 600px; margin: 0 auto; font-family: 'Rubik', sans-serif;"> |
| 14 | + <tr> |
| 15 | + <td style="width: 100%; background-color: #E0E7FF; padding: 16px; text-align: center; border-radius: 8px 8px 0 0;"> |
| 16 | + <table width="100%" border="0" cellpadding="16" cellspacing="0" style="border-radius: 8px 8px 0 0;"> |
| 17 | + <tr> |
| 18 | + <td style="text-align: center;"> |
| 19 | + <img src="https://res.cloudinary.com/ddf0u9tgz/image/upload/v1724949908/emailLogo_rmmwdi.png" style="width: 150px; height: auto;" alt="Logo" /> |
| 20 | + <p style="margin: 10px 0 0; font-size: 18px; font-weight: bold; color: #8667F2;">New Contact Form Submission</p> |
| 21 | + </td> |
| 22 | + </tr> |
| 23 | + </table> |
| 24 | + </td> |
| 25 | + </tr> |
| 26 | +
|
| 27 | + <tr> |
| 28 | + <td style="padding: 16px; color: black; text-align: left;"> |
| 29 | + <p>Hello,</p> |
| 30 | + <p>You have received a new contact form submission. Below are the details:</p> |
| 31 | + <table width="100%" cellpadding="8" cellspacing="0" style="margin-top: 20px; border: 1px solid #ddd; border-radius: 8px;"> |
| 32 | + <tr> |
| 33 | + <td style="background-color: #f1f1f1; font-weight: bold; color: #333;">Name:</td> |
| 34 | + <td style="background-color: #ffffff; color: #333;">${name}</td> |
| 35 | + </tr> |
| 36 | + <tr> |
| 37 | + <td style="background-color: #f1f1f1; font-weight: bold; color: #333;">Email:</td> |
| 38 | + <td style="background-color: #ffffff; color: #333;">${email}</td> |
| 39 | + </tr> |
| 40 | + <tr> |
| 41 | + <td style="background-color: #f1f1f1; font-weight: bold; color: #333;">Phone:</td> |
| 42 | + <td style="background-color: #ffffff; color: #333;">${ |
| 43 | + phone || 'Not Provided' |
| 44 | + }</td> |
| 45 | + </tr> |
| 46 | + <tr> |
| 47 | + <td style="background-color: #f1f1f1; font-weight: bold; color: #333;">Message:</td> |
| 48 | + <td style="background-color: #ffffff; color: #333;">${message}</td> |
| 49 | + </tr> |
| 50 | + </table> |
| 51 | + |
| 52 | + <div style="margin-top: 30px; padding: 10px 0; text-align: center;"> |
| 53 | + <p style="font-size: 12px; color: #777777;">© 2024 Devpulse. All rights reserved.</p> |
| 54 | + </div> |
| 55 | + </td> |
| 56 | + </tr> |
| 57 | + </table> |
| 58 | + ` |
| 59 | +} |
| 60 | + |
| 61 | +export default contactFormTemplate |
0 commit comments