HangfireIO / HangfireIO/Hangfire

Send mail with attachment file

Open
#403 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
10.1k
Forks
1.8k
Avg merge
1h 19m
Merged PRs (30d)
1

Description

Hello,

I use Hangfire for send background email, but have error when mail has attachment file.

My bug as bellow, pls help to fix

message: "Newtonsoft.Json.JsonSerializationException: Error getting value from 'ReadTimeout' on 'System.IO.MemoryStream'. ---> System.InvalidOperationException: Timeouts are not supported on this stream.
↵ at System.IO.Stream.get_ReadTimeout()
↵ at GetReadTimeout(Object )
↵ at Newtonsoft.Json.Serialization.DynamicValueProvider.GetValue(Object target)
↵ --- End of inner exception stack trace ---
↵ at Newtonsoft.Json.Serialization.DynamicValueProvider.GetValue(Object target)
↵ at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.CalculatePropertyValues(JsonWriter writer, Object value, JsonContainerContract contract, JsonProperty member, JsonProperty property, JsonContract& memberContract, Object& memberValue)
↵ at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
↵ at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
↵ at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeList(JsonWriter writer, IEnumerable values, JsonArrayContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
↵ at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
↵ at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType)
↵ at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType)
↵ at Newtonsoft.Json.JsonConvert.SerializeObjectInternal(Object value, Type type, JsonSerializer jsonSerializer)
↵ at Astro.Hangfire.Common.JobHelper.ToJson(Object value) in

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.