ট্রিগার ইমেল এক্সটেনশন সহ হ্যান্ডেলবার টেমপ্লেট ব্যবহার করুন
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
আপনি যদি এক্সটেনশনের কনফিগারেশনের সময় একটি "টেমপ্লেট সংগ্রহ" প্যারামিটার নির্দিষ্ট করে থাকেন, তাহলে আপনি আপনার ইমেলের জন্য হ্যান্ডেলবার টেমপ্লেট টেমপ্লেট তৈরি এবং পরিচালনা করতে পারেন।
টেমপ্লেট সংগ্রহ কাঠামো
প্রতিটি নথিকে একটি স্মরণীয় আইডি দিন যা আপনি আপনার টেমপ্লেট সংগ্রহে যে নথিগুলি লেখেন তাতে টেমপ্লেট নাম হিসাবে ব্যবহার করেন৷
টেমপ্লেট নথিতে নিম্নলিখিত ক্ষেত্রগুলির যেকোনো একটি অন্তর্ভুক্ত থাকতে পারে:
বিষয়: ইমেলের বিষয়ের জন্য একটি টেমপ্লেট স্ট্রিং।
পাঠ্য: ইমেলের প্লেইনটেক্সট বিষয়বস্তুর জন্য একটি টেমপ্লেট স্ট্রিং।
html: ইমেলের HTML বিষয়বস্তুর জন্য একটি টেমপ্লেট স্ট্রিং।
amp: ইমেলের AMP4EMAIL বিষয়বস্তুর জন্য একটি টেমপ্লেট স্ট্রিং।
সংযুক্তি: মান হিসাবে টেমপ্লেট স্ট্রিং সহ সংযুক্তিগুলির একটি অ্যারে; নোডমেলার বিকল্পগুলি সমর্থিত: utf-8 স্ট্রিং, কাস্টম সামগ্রীর ধরন, URL, এনকোড করা স্ট্রিং, ডেটা URI, এবং পূর্ব-উত্পন্ন MIME নোড (সচেতন থাকুন যে আপনার ইমেলের ক্লাউড সার্ভারের ফাইল সিস্টেমে কোনও অ্যাক্সেস নেই)।
একটি উদাহরণ টেমপ্লেটের following এবং বিষয়বস্তুর একটি আইডি থাকতে পারে:
{subject:"@{{username}} is now following you!",html:"Just writing to let you know that <code>@{{username}}</code> ({{name}}) is now following you.",attachments:[{filename:"{{username}}.jpg",path:"{{imagePath}}"}]}
টেমপ্লেট ব্যবহার করে ইমেল পাঠান
টেমপ্লেট ব্যবহার করে ইমেল বিতরণ করতে, আপনার মেল সংগ্রহে নথি যোগ করার সময়, name এবং data বৈশিষ্ট্য সহ একটি template ক্ষেত্র অন্তর্ভুক্ত করুন। উদাহরণস্বরূপ, উপরে থেকে আমাদের following টেমপ্লেট ব্যবহার করে:
আপনি টেমপ্লেট নথিতে {partial: true} উল্লেখ করে পুনরায় ব্যবহারযোগ্য আংশিক ব্যবহার করে টেমপ্লেট রচনা করতে পারেন। প্রতিটি স্ট্যান্ডার্ড ডেটা ক্ষেত্র ( subject , html , text এবং amp ) শুধুমাত্র তার নিজস্ব পরিবেশে ব্যবহৃত আংশিক হিসাবে সংজ্ঞায়িত করা হবে। উদাহরণস্বরূপ, footer নামক একটি আংশিক ডেটা থাকতে পারে যেমন:
{partial:true,html:"<p>This mail was sent by ExampleApp, Inc. <a href='https://example.com/unsubscribe'>Unsubscribe</a></p>",text:"This mail was sent by ExampleApp, Inc. Unsubscribe here: https://example.com/unsubscribe"}
অন্য টেমপ্লেটে, আংশিকটিকে এর নাম উল্লেখ করে অন্তর্ভুক্ত করুন (ডকুমেন্ট আইডি):
<p>This is my main template content, but it will use a common footer.</p>
{{> footer }}
[[["সহজে বোঝা যায়","easyToUnderstand","thumb-up"],["আমার সমস্যার সমাধান হয়েছে","solvedMyProblem","thumb-up"],["অন্যান্য","otherUp","thumb-up"]],[["এতে আমার প্রয়োজনীয় তথ্য নেই","missingTheInformationINeed","thumb-down"],["খুব জটিল / অনেক ধাপ","tooComplicatedTooManySteps","thumb-down"],["পুরনো","outOfDate","thumb-down"],["অনুবাদ সংক্রান্ত সমস্যা","translationIssue","thumb-down"],["নমুনা / কোড সংক্রান্ত সমস্যা","samplesCodeIssue","thumb-down"],["অন্যান্য","otherDown","thumb-down"]],["2025-07-25 UTC-তে শেষবার আপডেট করা হয়েছে।"],[],[],null,["\u003cbr /\u003e\n\nIf you specified a \"Templates collection\" parameter during configuration of the\nextension, you can create and manage [Handlebars templates](https://handlebarsjs.com/)\ntemplates for your emails.\n\nTemplate collection structure\n\nGive each document a memorable ID that you use as the *template name* in the\ndocuments you write to your templates collection.\n\nThe template document can include any of the following fields:\n\n- **subject:** A template string for the subject of the email.\n- **text:** A template string for the plaintext content of the email.\n- **html:** A template string for the HTML content of the email.\n- **amp:** A template string for the [AMP4EMAIL](https://amp.dev/documentation/guides-and-tutorials/learn/email-spec/amp-email-format/) content of the email.\n- **attachments:** An array of attachments with template strings as values; [Nodemailer options](https://nodemailer.com/message/attachments/) supported: utf-8 string, custom content type, URL, encoded string, data URI, and pre-generated MIME node (be aware that your email has no access to the cloud server's file system).\n\nAn example template might have an ID of `following` and content like: \n\n {\n subject: \"@{{username}} is now following you!\",\n html: \"Just writing to let you know that \u003ccode\u003e@{{username}}\u003c/code\u003e ({{name}}) is now following you.\",\n attachments: [\n {\n filename: \"{{username}}.jpg\",\n path: \"{{imagePath}}\"\n }\n ]\n }\n\nSend emails using templates\n\nTo deliver email using templates, when adding documents to your mail collection,\ninclude a `template` field with `name` and `data` properties. For example,\nusing our `following` template from above: \n\n admin\n .firestore()\n .collection(\"MAIL_COLLECTION\")\n .add({\n toUids: [\"abc123\"],\n template: {\n name: \"following\",\n data: {\n username: \"ada\",\n name: \"Ada Lovelace\",\n imagePath: \"https://example.com/path/to/file/image-name.jpg\"\n },\n },\n });\n\nTemplate Partials\n\nYou can compose templates using reusable [partials](https://handlebarsjs.com/guide/partials.html)\nby specifying `{partial: true}` in the template document. Each of the standard\ndata fields (`subject`, `html`, `text`, and `amp`) will be defined as a partial\nused only in its own environment. For example, a partial called `footer` might\nhave data like: \n\n {\n partial: true,\n html: \"\u003cp\u003eThis mail was sent by ExampleApp, Inc. \u003ca href='https://example.com/unsubscribe'\u003eUnsubscribe\u003c/a\u003e\u003c/p\u003e\",\n text: \"This mail was sent by ExampleApp, Inc. Unsubscribe here: https://example.com/unsubscribe\"\n }\n\nIn another template, include the partial by referencing its name (document ID): \n\n \u003cp\u003eThis is my main template content, but it will use a common footer.\u003c/p\u003e\n\n {{\u003e footer }}"]]