Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISO8859-1 characters in subject #204

Open
dturriaga opened this issue Nov 12, 2021 · 0 comments
Open

ISO8859-1 characters in subject #204

dturriaga opened this issue Nov 12, 2021 · 0 comments

Comments

@dturriaga
Copy link

I read that only are supported UTF8 characters without RFC 2047...

How can I write in the subject words with vowels with tíldes and ñ?

All the sources of the project are in ISO8859-1, so when preparing the email I do:

	...
	$httpClient = new GuzzleAdapter(new Client());
	$sparky = new SparkPost($httpClient, ['key'=>"1234567890abcdef1234567890abcdef12345678"]);
	$promise = $sparky->transmissions->post([
	    'content' => [
			'from' => ['name' => $from_name, 'email' => $from_email],
			'subject' => utf8_encode($subject),
			'html' => utf8_encode($html),
			'text' => '{{user}}: html not supported',
	    ],
	    'substitution_data' => ['user' => $user],
	    'recipients' => [
	        [
	            'address' => ['name' => $user, 'email' => $email],
	        ],
	    ],
	]);

but latin1 characters in then subject display wrong
and, if I dont use utf8_encode on subject, I have an exception.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant