इसे छोड़कर कंटेंट पर जाएं

Email

अपने app से transactional emails भेजें। Sender identities manage करें और delivery track करें — अपने app के Admin > Email से।

हर Proyecta app transactional email भेज सकता है। एक sender identity verify करो, फिर अपने app code से भेजो — किसी अलग email provider account की जरूरत नहीं।

Builder में Admin > Email खोलो — या अपनी published site पर /admin। इसके दो हिस्से हैं:

हिस्सा किस काम के लिए
Identities Sender email addresses या domains add और verify करो
Sent Delivery status के साथ भेजे गए emails देखो (sent, delivered, bounced, आदि)

तुम एक नई sender identity add कर सकते हो और अपनी email delivery history देख सकते हो — बिना कोई code लिखे।

  1. Sender identity बनाओ और verify करो (एक email address या domain) अपने admin panel में
  2. भेजोuseSendEmail() से अपने app में, या campaigns के लिए admin panel से

Shared address से भेजो (@proyectamail.com)

Section titled “Shared address से भेजो (@proyectamail.com)”

सबसे आसान तरीका है Proyecta के shared sending domain, @proyectamail.com, पर एक address claim करना। यह बनाते ही verify हो जाता है — platform उस domain का मालिक है, इसलिए तुम्हें कोई DNS records set up नहीं करने पड़ते।

यह तुम अपने app के admin panel के Emails सेक्शन में करते हो: जो address चाहिए वो enter करो, और वो तुरंत तैयार है।

Single addresses सिर्फ @proyectamail.com पर काम करते हैं। किसी दूसरे domain पर (जैसे hello@myapp.com) address माँगने पर reject हो जाएगा — अपने domain से भेजने के लिए, पूरा domain verify करो (नीचे देखो)। हर shared address globally reserved होता है, इसलिए दो apps एक ही @proyectamail.com sender के रूप में नहीं भेज सकते।

अपना domain verify करो (Pro)

Section titled “अपना domain verify करो (Pro)”

अपने domain से भेजने के लिए — उस पर किसी भी address से (hello@, support@, noreply@, आदि) — पूरा domain verify करो। Shared @proyectamail.com address के विपरीत, custom domain तुरंत verify नहीं होता।

उसी Emails सेक्शन में domain add करो। यह email provider के साथ register होता है और तुम्हें SPF, DKIM, और DMARC records दिखाता है जो तुम्हें अपने DNS में publish करने हैं। Sender तब तक pending रहता है जब तक वे records propagate होकर provider द्वारा confirm नहीं हो जाते, फिर verified हो जाता है — records publish करने के बाद re-check button use करो।

DNS-based domain verification पूरी तरह implement है — records provider द्वारा generate होते हैं और हर re-check उनका status दोबारा poll करता है।

पर्दे के पीछे: Proyecta तुम्हारे sending domain को अपने email-identity provider (Resend) से authenticate करता है और तुम्हारे messages अपने transactional provider (SendGrid) से deliver करता है। तुम्हें किसी के साथ भी account manage नहीं करना पड़ता।

अपने app से email भेजो

Section titled “अपने app से email भेजो”

अपने app के pages से तुम useSendEmail() hook से भेजते हो। तुम एक template चुनते हो और variables pass करते हो; platform message को app की भाषा में render करके भेजता है:

import { useSendEmail } from '@/hooks/useEmail.ts';
function ConfirmButton({ booking }) {
const { send, isPending, error } = useSendEmail();
return (
<button
disabled={isPending}
onClick={() =>
send({
template: 'booking_confirmation',
variables: { date: booking.date, service: booking.service },
})
}
>
Email me the details
</button>
);
}

ध्यान दो कि तुम क्या नहीं pass करते: कोई recipient, subject, या HTML नहीं। हर template अपना audience खुद declare करता है:

  • self (booking/order confirmations, welcome) → signed-in user का अपना address, उनके session से लिया जाता है।
  • owner (owner_alert) → तुम्हारे app के admins।

दोनों के लिए signed-in session जरूरी है। यह जानबूझकर है, कोई कमी नहीं: वो publishable key जो call को authenticate करती है तुम्हारे page source में होती है, इसलिए arbitrary-recipient send किसी को भी तुम्हारे app को spam relay के रूप में use करने देता। किसी anonymous visitor से खुद को notify करने के लिए, form use करो — form submissions पहले से ही owner को email करते हैं और submitter को automatically confirm करते हैं, और वो path browser से forge नहीं किया जा सकता।

Errors PlatformApiError के रूप में आते हैं: 401 (session चाहिए), 403 (इस app के लिए template enabled नहीं), 429 (rate limited — message दिखाओ और retry का option दो), 422 (कोई address नहीं)।

तुम्हारे admin panel का Sent tab वो सब कुछ list करता है जो तुम्हारे app ने भेजा है, उसके latest delivery event के साथ — delivered, opened, clicked, bounced, complained — इसलिए आमतौर पर तुम्हें इसके लिए code की जरूरत नहीं।

हर entry अपना status लेकर आती है — sent, delivered, opened, clicked, bounced, या complained — और तुम कोई भी message खोलकर वो exact HTML और text पढ़ सकते हो जो गया था। अगर deliveries fail हो रही हैं, तो यहीं पहले देखो।

यह सब तुम्हें हाथ से लिखने की जरूरत नहीं:

  • "Verify hello@myapp.com as a sending identity."
  • "Email the customer a confirmation after they finish booking."
  • "After a successful checkout, send the customer their receipt."
  • "Show me the last 20 emails we've sent and whether they bounced."
  • from address एक verified identity होनी चाहिए। Unverified address से भेजने पर error आता है।
  • Monthly limits लागू होते हैं तुम्हारे Proyecta plan के आधार पर।

जल्द आने वाला है

Section titled “जल्द आने वाला है”
  • Template editor — builder में visually transactional templates design करो
  • Bulk/batch send endpoint mass mailings के लिए