import { sha256sum } from "./util";


// TODO read these from environment
export const EMAIL_HOST = "mx1.amogus.cloud";
export const SMTP_PORT = "465";
export const IMAP_PORT = "993";
export const SMTP_SECURITY = "SSL/TLS";
export const IMAP_SECURITY = "SSL/TLS";
export const WEBMAIL_URL = "https://webmail.amogus.cloud";
export const ALIAS_DOMAINS = ["amogus.cloud", "lea.pet", "futacockinside.me"];
export const GRAVATAR_DEFAULT = "retro";
export const TEMP_EMAIL_DOMAIN = "t.amogus.cloud";

export function avatarUrl(email: string) {
  //return `https://gravatar.com/avatar/${sha256sum(email)}?d=${GRAVATAR_DEFAULT}`;
  return `https://picvatar.lea.pet/generate/47882/${sha256sum(email)}?gravatar=1`;
}
