ইমেইল
আপনার অ্যাপ থেকে transactional ইমেইল পাঠান। Dashboard > Emails বা SDK থেকে sender identity ম্যানেজ করুন এবং delivery ট্র্যাক করুন।
প্রতিটি Proyecta অ্যাপ transactional ইমেইল পাঠাতে পারে। একটি sender identity verify করুন, তারপর আপনার অ্যাপ কোড থেকে ইমেইল পাঠান — আলাদা কোনো ইমেইল প্রোভাইডার অ্যাকাউন্টের প্রয়োজন নেই।
Emails ট্যাব
Section titled “Emails ট্যাব”builder-এ Dashboard > Emails খুলুন। ট্যাবটিতে দুটি sub-tab রয়েছে:
| ট্যাব | কীসের জন্য |
|---|---|
| Identities | sender ইমেইল ঠিকানা বা domain যোগ করুন এবং verify করুন |
| Sent | delivery status সহ পাঠানো ইমেইল ব্রাউজ করুন (sent, delivered, bounced ইত্যাদি) |
কোড না লিখেই আপনি নতুন sender identity যোগ করতে এবং ইমেইল delivery ইতিহাস দেখতে পারবেন।
দুই ধাপের সেটআপ
Section titled “দুই ধাপের সেটআপ”- একটি sender identity তৈরি ও verify করুন (একটি ইমেইল ঠিকানা বা domain)
proyecta.email.send()কল করুনfromফিল্ডে verified ঠিকানা দিয়ে
একটি ইমেইল ঠিকানা verify করুন
Section titled “একটি ইমেইল ঠিকানা verify করুন”সবচেয়ে সহজ পথ হলো একটি single ইমেইল ঠিকানা verify করা।
import Proyecta from '@proyecta-ai/sdk';
const proyecta = new Proyecta({ apiKey: process.env.PROYECTA_API_KEY });
const identity = await proyecta.email.identities.create({ type: 'email', value: 'hello@myapp.com',});
// identity.status === 'verified' immediately upon creationverification চেক আবার চালু করতে:
await proyecta.email.identities.verify({ identityId: identity.id });পুরো domain verify করুন
Section titled “পুরো domain verify করুন”production অ্যাপের জন্য, পুরো domain verify করুন যাতে আপনি সেই domain-এর যেকোনো ঠিকানা থেকে ইমেইল পাঠাতে পারেন (hello@, support@, noreply@, ইত্যাদি)।
const identity = await proyecta.email.identities.create({ type: 'domain', value: 'myapp.com',});
// identity.status === 'verified' immediately upon creationDNS-ভিত্তিক domain verification (SPF/DKIM রেকর্ড তৈরি এবং পুনরায় যাচাই) পরিকল্পিত আছে কিন্তু এখনো implement করা হয়নি।
একটি ইমেইল পাঠান
Section titled “একটি ইমেইল পাঠান”আপনার identity verify হয়ে গেলে, এভাবে পাঠান:
await proyecta.email.send({ from: 'Acme <hello@myapp.com>', to: 'customer@example.com', subject: 'Your receipt from Acme', html: '<p>Thanks for your order — here are the details.</p>', text: 'Thanks for your order — here are the details.',});send পাঠানো ইমেইলের পূর্ণ অবজেক্ট রিটার্ন করে (যেমন id, last_event, এবং message ফিল্ডসহ), যা পরে delivery status দেখতে ব্যবহার করা যায়।
Recipients। to, cc, এবং bcc সবই single ঠিকানা বা একটি array গ্রহণ করে।
Content। html, text, বা উভয়ই দিন। সেরা deliverability-র জন্য একটি plain-text version অন্তর্ভুক্ত করুন।
Reply-to, custom headers, metadata tags। reply_to সমর্থিত (প্রথম ঠিকানাটি ব্যবহৃত হয়)। Custom headers এবং metadata tags API গ্রহণ করে কিন্তু এখনো delivery প্রোভাইডারে forward করা হয় না।
delivery ট্র্যাক করুন
Section titled “delivery ট্র্যাক করুন”সর্বশেষ delivery event সহ পাঠানো ইমেইলের তালিকা দেখুন (paginated):
const { data: emails } = await proyecta.email.list({ limit: 20 });for (const email of emails) { console.log(email.subject, '→', email.last_event); // last_event: 'sent' | 'delivered' | 'opened' | 'clicked' | 'bounced' | 'complained'}একটি single ইমেইল তার পূর্ণ HTML/text body সহ আনুন:
const full = await proyecta.email.get('email_abc123');console.log(full.html, full.text, full.last_event);AI দিয়ে সেটআপ করুন
Section titled “AI দিয়ে সেটআপ করুন”এটি নিজে হাতে লেখার দরকার নেই:
"Verify hello@myapp.com as a sending identity.""Send a welcome email with Proyecta Email whenever a new user signs up. Use a nice HTML template.""After a successful checkout, send the customer a receipt using proyecta.email.send.""Show me the last 20 emails we've sent and whether they bounced."
সতর্কতা
Section titled “সতর্কতা”fromঠিকানাটি অবশ্যই একটি verified identity হতে হবে। অযাচিত ঠিকানা দিয়ে পাঠালে error ফেরত আসে।- আপনার Proyecta প্ল্যানের উপর ভিত্তি করে মাসিক সীমা প্রযোজ্য।
শীঘ্রই আসছে
Section titled “শীঘ্রই আসছে”- Template editor — builder-এ visually transactional template ডিজাইন করুন
- Bulk/batch send endpoint — mass mailing-এর জন্য