From 20b1a8e6e39b3adf058b32f1b2e219ee93a9f1c7 Mon Sep 17 00:00:00 2001 From: dujinkim Date: Mon, 12 May 2025 11:32:25 +0000 Subject: (대표님) 메일 발송 - 언어별 템플릿 추가 및 rfq 알림림 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/mail/sendEmail.ts | 15 ++- lib/mail/templates/po-rfq-invite-en.hbs | 116 ++++++++++++++++++++++ lib/mail/templates/po-rfq-invite-ko.hbs | 86 +++++++++++++++++ lib/mail/templates/rfq-notification.hbs | 166 ++++++++++++++++++++++++++++++++ 4 files changed, 380 insertions(+), 3 deletions(-) create mode 100644 lib/mail/templates/po-rfq-invite-en.hbs create mode 100644 lib/mail/templates/po-rfq-invite-ko.hbs create mode 100644 lib/mail/templates/rfq-notification.hbs (limited to 'lib/mail') diff --git a/lib/mail/sendEmail.ts b/lib/mail/sendEmail.ts index c4171082..97617e7a 100644 --- a/lib/mail/sendEmail.ts +++ b/lib/mail/sendEmail.ts @@ -7,7 +7,9 @@ interface SendEmailOptions { subject: string; template: string; // 템플릿 파일명(확장자 제외) context: Record; // 템플릿에 주입할 데이터 - attachments?: { // NodeMailer "Attachment" 타입 + cc?: string | string[]; // cc 필드 추가 - 단일 이메일 또는 이메일 배열 + attachments?: { + // NodeMailer "Attachment" 타입 filename?: string path?: string content?: Buffer | string @@ -15,7 +17,14 @@ interface SendEmailOptions { }[] } -export async function sendEmail({ to, subject, template, context, attachments = []}: SendEmailOptions) { +export async function sendEmail({ + to, + subject, + template, + context, + cc, // cc 매개변수 추가 + attachments = [] +}: SendEmailOptions) { const { t, i18n } = await useTranslation(context.language ?? "en", "translation"); handlebars.registerHelper("t", function (key: string, options: any) { @@ -28,9 +37,9 @@ export async function sendEmail({ to, subject, template, context, attachments = await transporter.sendMail({ from: `"${process.env.Email_From_Name}" <${process.env.Email_From_Address}>`, to, + cc, // cc 필드 추가 subject, html, attachments }); } - diff --git a/lib/mail/templates/po-rfq-invite-en.hbs b/lib/mail/templates/po-rfq-invite-en.hbs new file mode 100644 index 00000000..5b47851c --- /dev/null +++ b/lib/mail/templates/po-rfq-invite-en.hbs @@ -0,0 +1,116 @@ +{{> header logoUrl=logoUrl }} + +

+ SHI RFQ NO. : #{{rfqCode}} +

+ +

+ Dear Sirs, +

+ +

+ We hope your business continuously will be thriving in the years ahead and we are pleased to send you RFQ for the subject item. +

+ +

+ It would be appreciated if we receive your competitive quotation in compliance with the following terms and conditions + by the bid closing date (COB of {{DLDate}}) + Otherwise we will consider that you have no interest on this RFQ. +

+ +
+

A. Commercial terms and conditions

+

+ A-1 Project: {{projectName}} + Option {{projectOption}} (Validity: {{ProjectOptionValidity}}) +
* Ship's Delivery date('YY.MM.DD): {{DLDate}} +

+

+ A-2 Spec. & Scope of the Supply : See the attached PGS/SGS/POS +

+

+ A-3 Terms of Delivery : {{incoterms}} +

+

+ A-4 Estimated Delivery Date: {{EstimatedDeliveryDate}} +
- The delivery date can be adjusted by the buyer's procurement part. +

+

+ A-5 Terms of Payment : {{paymentCondition}} +

+

+ A-6 Warranty Period +
The Goods supplied and the works performed under this contract shall be guaranteed for {{warrantyPeriod}} months after vessel's delivery. +
However, the guaranteed period for repair or replacement shall be extended to {{repairAdditionalPeriod}} months, +
but total guaranteed period shall not exceed {{totalPeriod}} months after vessel's delivery date. +

+

+ A-7 Others not mentioned here are as per previous contract terms. +

+
+ +
+

B. The following information should be included in the Bidder's quotation.

+

+ B-1 Detailed and Break-Down price (excluding VAT) for the supplies, the spare parts for start-up & commissioning and documentation. +

+

+ B-2 Deviations, if any, from the Buyer's spec and scope of the supply should be specified on the quotation. +
Unless specified herein, the Bidder shall be regarded as fully complying with the buyer's spec. and scope of supply. +

+

+ B-3 The earliest possible date for Technical meeting at Geoje Shipyard +

+

+ B-4 Any suggestions in order for both parties to be competitive shall be suggested, if available. +

+
+ +
+

C. Bid Closing Date : {{deadline}}

+
+ +
+

D. Buyer's Right

+

+ D-1 Buyer may select seller which did not submit the lowest bid +

+

+ D-2 Buyer may accept or reject some or all of a price quotation, without obligation to notify any person or entity of such rejection. +

+

+ D-3 and Buyer shall have no obligation to notify a bidder of the final decision of rejecting a bid. +

+
+ +
+

E. Seller's Obligation

+

+ E-1 Seller shall be liable for all costs incurred in submitting a price quotation. +

+

+ E-2 Under no circumstances will a subcontractor not finally selected as Seller have the right to claim for compensation against Buyer. +

+

+ E-3 Selected Seller on condition of shipowner's approval is not allowed to start work without first obtaining the approval of shipowner, +
otherwise Seller has no right to make a claim for compensation. +

+
+ +

+ If you have any question, please do not hesitate to contact us. +

+ +

+ Best regards, +
OOO / Procurement Manager / oooo@samsung.com +
SAMSUNG HEAVY INDUSTRIES CO., LTD. +
80, Jangpyeong 3-ro, Geoje-si, Gyeongsangnam-do, Republic of Korea, 53261 +

+ +

+ + View Quotation + +

+ +{{> footer logoUrl=logoUrl companyName=companyName year=year }} \ No newline at end of file diff --git a/lib/mail/templates/po-rfq-invite-ko.hbs b/lib/mail/templates/po-rfq-invite-ko.hbs new file mode 100644 index 00000000..372aadb2 --- /dev/null +++ b/lib/mail/templates/po-rfq-invite-ko.hbs @@ -0,0 +1,86 @@ +{{> header logoUrl=logoUrl }} + +

+ SHI RFQ NO. : #{{rfqCode}} +

+ +

+ 안녕하세요, Vendor #{{vendorId}}님. +

+ +

+ 귀사의 일익 번창하심을 기원합니다. +

+ +

+ 표제 품목에 대한 견적을 요청하오니 하기 및 첨부 내용 확인하시어 견적서 및 기술사양서 자료를 eVCP를 통해 제출 바랍니다. + 또한, 귀사의 신제품 적용 방안이나, 당사 사양 및 공급 범위에 Deviation이 있는 경우 + 별도의 견적을 제출하시어 당사에서 적극 검토할 수 있도록 협조 바랍니다. + 귀사의 견적은 아래의 견적 마감일 이전에 당사로 제출 되어야하며, 견적 마감일 및 당사의 지연 통보없이 미 제출될 경우에는 대상에서 제외될 수 있습니다. +

+ +
+

가. 거래조건

+

+ 1) 프로젝트 : {{projectName}} + 옵션 {{projectOption}} (Validity : {{ProjectOptionValidity}}) +
* 호선별 D/L 일정('YY.MM.DD) : {{DLDate}} +

+

+ 2) Spec, & Scope of Supply : 첨부 POS 참조 +

+

+ 3) Class / Flag : 첨부 POS 참조 +

+

+ 4) Estimated Delivery Date : {{EstimatedDeliveryDate}} +
* 상세 납기는 조선소 스케쥴에 따라 변경될 수 있으며, 당사 조달/현업/생산 부서와 협의하여 결정됨. +
* 안전보건에 관한 사항을 고려하여 납기(또는 계약기간)의 적정성을 검토하고, +
안전보건확보를 위해 납기의 조정이 필요한 경우 기간 조정을 신청하시기 바랍니다. +
* (당사 사업장 내에서 수행하는 작업이 포함된 계약) +

+

+ 5) Warranty : 선박 인도 후 {{warrantyPeriod}}개월 시점까지 납품한 "자재" 또는 "용역"이 계약 내용과 동일함을 보증하며, +
Repair 시 {{repairAdditionalPeriod}}개월 추가되나, 총 인도 후 {{totalPeriod}}개월을 넘지 않음. +

+

+ 6) 견적마감기한 : {{deadline}} +

+

+ 7) 대금지급조건 : {{paymentCondition}} +

+

+ 8) 기타 일반사항은 삼성중공업 표준하도급기본계약서, 안전보건관리 약정서 및 자재 안전 납품/하역을 위한 표준규정에 준함. +

+

+ 9) 유의사항 +
- 발주자는 최저가 견적을 제출하지 않은 협력사를 선정할 수 있으며, +
견적의 일부 또는 전부를 승인하거나 거절할 수 있고 거부하는 경우 별도 통보할 의무가 없다. +
또한, 최종 탈락 사실을 통보할 의무도 없다. +
- 협력사는 견적 제출을 위해 소요되는 비용 일체를 부담하며, +
최종 계약자로 선정되지 못한 경우에도 발주자에게 보상을 청구할 수 없다. +
또한, 선주 승인조건으로 선정된 협력사는 반드시 선주 승인을 득한 후 작업에 착수하여야 하며, +
승인 거절 시 계약은 미 체결, 해제될 수 있고 이 경우 협력사는 어떠한 보상도 청구할 수 없다. +

+
+ +
+

나. 견적 내용

+

+ 1) 품목별 단가 및 총액 +

+

+ 2) 가격 기재(VAT 제외) 견적서 / 가격 미기재 견적서 / 설계 Technical Bid Evaluation(TBE) 자료 제출 +

+

+ 3) 당사 PGS, SGS & POS에 대한 Deviation List +
* 별도 Deviation이 없는 경우 견적서 상에 명기 +

+
+ +

+ + 견적서 확인하기 + +

+ +{{> footer logoUrl=logoUrl companyName=companyName year=year }} \ No newline at end of file diff --git a/lib/mail/templates/rfq-notification.hbs b/lib/mail/templates/rfq-notification.hbs new file mode 100644 index 00000000..fc510ad0 --- /dev/null +++ b/lib/mail/templates/rfq-notification.hbs @@ -0,0 +1,166 @@ + + + + + + {{t "email.rfq.title"}} + + + +
+
+

{{t "email.rfq.notification_title"}}

+
+
+

{{t "email.greeting" name=vendor.user.fullName}},

+ +

{{t "email.rfq.introduction"}}

+ +
{{t "email.rfq.details_section"}}
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{t "email.rfq.code_label"}}{{rfq.code}}
{{t "email.rfq.title_label"}}{{rfq.title}}
{{t "email.rfq.description_label"}}{{rfq.description}}
{{t "email.rfq.vendor_label"}}{{vendor.name}}
{{t "email.rfq.quotation_code_label"}}{{quotationCode}}
{{t "email.rfq.due_date_label"}}{{rfq.dueDate}}
{{t "email.rfq.delivery_date_label"}}{{rfq.deliveryDate}}
{{t "email.rfq.currency_label"}}{{details.currency}}
{{t "email.rfq.payment_terms_label"}}{{details.paymentTerms}}
{{t "email.rfq.incoterms_label"}}{{details.incoterms}}
+ +
{{t "email.rfq.items_section"}}
+ + + + + + + + + + + {{#each items}} + + + + + + + {{/each}} + +
{{t "email.rfq.item_number"}}{{t "email.rfq.item_description"}}{{t "email.rfq.item_quantity"}}{{t "email.rfq.item_uom"}}
{{itemNumber}}{{description}}{{quantity}}{{uom}}
+ +

{{t "email.rfq.action_instructions"}}

+ +

+ + {{t "email.rfq.view_button"}} + +

+ +

{{t "email.rfq.closing"}}

+

{{t "email.rfq.sender_signature" name=sender.fullName}}
+ {{sender.email}}

+
+ +
+ + \ No newline at end of file -- cgit v1.2.3