import logging
from string import Template
import boto3
from mailersend import emails
from app.config import Config
from static.sparc_logo_base64 import sparc_logo_base64
subject = "Message from SPARC Portal"
ses_client = boto3.client(
"ses",
aws_access_key_id=Config.SPARC_PORTAL_AWS_KEY,
aws_secret_access_key=Config.SPARC_PORTAL_AWS_SECRET,
region_name=Config.AWS_REGION,
)
mailer = emails.NewEmail(Config.MAILERSEND_API_KEY)
feedback_email = Template('''\
Thank you for your feedback on the SPARC Portal!
Your message:
$message
''')
issue_reporting_email = Template('''\
Thank you for reporting the following error/issue on the SPARC Portal!
$message
''')
service_form_submission_request_confirmation_email = Template(f'''\
Hi $name,
Thank you for your submission!
We've successfully received your form and appreciate you taking the time to provide this information. The information you submitted is included below for your records.
The SPARC Data and Resource Center (DRC) has a depth of expertise in developing and supporting digital resources that can be shared, cited, visualized, computed, and used for virtual experimentation. Your interest in SPARC supports FAIR data principles—making research data Findable, Accessible, Interoperable, and Reusable. We truly appreciate your commitment to contributing to the broader scientific community and supporting efforts that will benefit researchers for years to come.
Our team will review your submission and make our best effort to get back to you within the next 5 business days. If you have any questions in the meantime, please don't hesitate to contact us at services@sparc.science.
Thank you again for your dedication to advancing scientific progress.
Best regards,
SPARC Data and Resource Center
https://sparc.science
NIH-approved, HEAL-compliant repository
Registered with re3data.org
Your submission:
$message
Hi $name,
Thank you for your submission!
We've successfully received your form and appreciate you taking the time to provide this information. The information you submitted is included below for your records.
By participating in this process, you're helping advance FAIR data principles—making research data Findable, Accessible, Interoperable, and Reusable. We truly appreciate your commitment to contributing to the broader scientific community and supporting efforts that will benefit researchers for years to come.
Our team will review your submission and get back to you within the next 3 business days. If you have any questions in the meantime, please don't hesitate to contact us at services@sparc.science.
Thank you again for your dedication to advancing scientific progress.
Best regards,
SPARC Data and Resource Center
https://sparc.science
NIH-approved, HEAL-compliant repository
Registered with re3data.org
Your submission:
$message
Hi $name,
Thank you for your submission!
We've successfully received your form and appreciate you taking the time to provide this information. The information you submitted is included below for your records.
By participating in this process, you're helping advance FAIR data principles—making research data Findable, Accessible, Interoperable, and Reusable. Through our partnership between Autonomic Neuroscience: Basic and Clinical and SPARC, we're working together to create a more robust and accessible scientific ecosystem. We truly appreciate your commitment to contributing to the broader scientific community and supporting efforts that will benefit researchers for years to come.
Our team will review your submission and get back to you within the next 3 business days. If you have any questions in the meantime, please don't hesitate to contact us at services@sparc.science.
Thank you again for your dedication to advancing scientific progress.
Best regards,
SPARC Data and Resource Center
https://sparc.science
NIH-approved, HEAL-compliant repository
Registered with re3data.org
Your submission:
$message